public class PsiLambdaExpressionImpl extends JavaStubPsiElement<FunctionalExpressionStub<PsiLambdaExpression>> implements PsiLambdaExpression
Iconable.IconFlags, Iconable.LastComputedIcon
CREATION_TRACE, ourTraceStubAstBinding
FLAGS_LOCKED, ICON_PLACEHOLDER
EMPTY_ARRAY
ARRAY_FACTORY, EXPRESSION_TO_TYPE
ICON_FLAG_IGNORE_MASK, ICON_FLAG_OPEN, ICON_FLAG_READ_STATUS, ICON_FLAG_VISIBILITY
EMPTY_NAVIGATABLE_ELEMENT_ARRAY
EMPTY_NAVIGATION_ITEM_ARRAY
Constructor and Description |
---|
PsiLambdaExpressionImpl(ASTNode node) |
PsiLambdaExpressionImpl(FunctionalExpressionStub<PsiLambdaExpression> stub) |
Modifier and Type | Method and Description |
---|---|
void |
accept(PsiElementVisitor visitor)
Passes the element to the specified visitor.
|
PsiElement |
getBody()
Returns PSI element representing lambda expression body:
PsiCodeBlock , PsiExpression ,
or null if the expression is incomplete. |
PsiType |
getFunctionalInterfaceType() |
PsiType |
getGroundTargetType(PsiType functionalInterfaceType)
JLS 9.9.
|
javax.swing.Icon |
getIcon(int flags) |
PsiParameterList |
getParameterList()
Returns this lambda expression's parameter list.
|
PsiType |
getType()
Returns the type of the expression.
|
boolean |
hasFormalParameterTypes() |
boolean |
isAcceptable(PsiType leftType,
PsiMethod method) |
boolean |
isPotentiallyCompatible(PsiType left)
A lambda expression (p15.27) is potentially compatible with a functional interface type (p9.8) if all of the following are true:
The arity of the target type's function type is the same as the arity of the lambda expression.
|
boolean |
isValueCompatible() |
boolean |
isVoidCompatible() |
boolean |
processDeclarations(PsiScopeProcessor processor,
ResolveState state,
PsiElement lastParent,
PsiElement place)
Passes the declarations contained in this PSI element and its children
for processing to the specified scope processor.
|
java.lang.String |
toString()
toString() should never be presented to the user.
|
acceptChildren, add, addAfter, addBefore, calcTreeElement, checkAdd, clone, cloneImpl, delete, deleteChildRange, getChildren, getLanguage, getTextOffset, replace
getContainingFile, getContext, getElementType, getGreenStub, getManager, getNode, getParent, getParentByStub, getParentByTree, getProject, getRequiredStubOrPsiChild, getStub, getStubOrPsiChild, getStubOrPsiChildren, getStubOrPsiChildren, getStubOrPsiChildren, getStubOrPsiChildren, getStubOrPsiParentOfType, isPhysical, isValid, isWritable, setNode, setSubstrateRef
addInternal, addRange, addRangeAfter, addRangeBefore, checkDelete, copy, deleteChildInternal, findChildByFilter, findChildByType, findChildByType, findChildrenByType, findChildrenByType, findChildrenByType, findChildrenByType, findElementAt, findLastChildByType, findNotNullChildByType, findNotNullChildByType, getCopyableUserData, getFirstChild, getLastChild, getNextSibling, getPrevSibling, getStartOffsetInParent, getText, getTextLength, getTextRange, putCopyableUserData, replaceChildInternal, subtreeChanged, textContains, textMatches, textToCharArray
canNavigate, canNavigateToSource, findChildByClass, findChildrenByClass, findNotNullChildByClass, findReferenceAt, getName, getNavigationElement, getOriginalElement, getPresentation, getReference, getReferences, getResolveScope, getUseScope, isEquivalentTo, navigate, notNullChild, textMatches
buildRowIcon, computeBaseIcon, createLayeredIcon, getAdjustedBaseIcon, getBaseIcon, getElementIcon, iconWithVisibilityIfNeeded, isNativeFileType, isVisibilitySupported, overlayIcons, registerIconLayer, transformFlags
changeUserMap, clearUserData, copyCopyableDataTo, copyUserDataTo, getUserData, getUserDataString, getUserMap, isUserDataEmpty, putUserData, putUserDataIfAbsent, replace, setUserMap
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
isAcceptable
acceptChildren, add, addAfter, addBefore, addRange, addRangeAfter, addRangeBefore, checkAdd, checkDelete, copy, delete, deleteChildRange, findElementAt, findReferenceAt, getChildren, getContainingFile, getContext, getCopyableUserData, getFirstChild, getLanguage, getLastChild, getManager, getNavigationElement, getNextSibling, getNode, getOriginalElement, getOwnReferences, getParent, getPrevSibling, getProject, getReference, getReferences, getResolveScope, getStartOffsetInParent, getText, getTextLength, getTextOffset, getTextRange, getTextRangeInParent, getUseScope, isEquivalentTo, isPhysical, isValid, isWritable, putCopyableUserData, replace, textContains, textMatches, textMatches, textToCharArray
getUserData, putUserData
getName, getPresentation
canNavigate, canNavigateToSource, navigate
getElementType, getStub
public PsiLambdaExpressionImpl(FunctionalExpressionStub<PsiLambdaExpression> stub)
public PsiLambdaExpressionImpl(ASTNode node)
public PsiParameterList getParameterList()
PsiLambdaExpression
getParameterList
in interface PsiLambdaExpression
getParameterList
in interface PsiParameterListOwner
public PsiElement getBody()
PsiLambdaExpression
PsiCodeBlock
, PsiExpression
,
or null if the expression is incomplete.getBody
in interface PsiLambdaExpression
getBody
in interface PsiParameterListOwner
public PsiType getFunctionalInterfaceType()
getFunctionalInterfaceType
in interface PsiFunctionalExpression
public boolean isVoidCompatible()
isVoidCompatible
in interface PsiLambdaExpression
public boolean isValueCompatible()
isValueCompatible
in interface PsiLambdaExpression
public PsiType getType()
PsiExpression
getType
in interface PsiExpression
public void accept(PsiElementVisitor visitor)
PsiElement
accept
in interface PsiElement
accept
in class PsiElementBase
visitor
- the visitor to pass the element to.public boolean processDeclarations(PsiScopeProcessor processor, ResolveState state, PsiElement lastParent, PsiElement place)
PsiElement
processDeclarations
in interface PsiElement
processDeclarations
in class PsiElementBase
processor
- the processor receiving the declarations.lastParent
- the child of this element has been processed during the previous
step of the tree up walk (declarations under this element do not need
to be processed again)place
- the original element from which the tree up walk was initiated.public java.lang.String toString()
PsiElement
toString
in interface PsiElement
toString
in class java.lang.Object
public boolean hasFormalParameterTypes()
hasFormalParameterTypes
in interface PsiLambdaExpression
public boolean isAcceptable(PsiType leftType, PsiMethod method)
isAcceptable
in interface PsiFunctionalExpression
public boolean isPotentiallyCompatible(PsiType left)
PsiLambdaExpression
isPotentiallyCompatible
in interface PsiFunctionalExpression
isPotentiallyCompatible
in interface PsiLambdaExpression
public PsiType getGroundTargetType(PsiType functionalInterfaceType)
PsiFunctionalExpression
getGroundTargetType
in interface PsiFunctionalExpression
public javax.swing.Icon getIcon(int flags)
getIcon
in interface Iconable
getIcon
in class ElementBase