Interface FunctionalExpression
- All Superinterfaces:
ASTExpression,ASTMemberValue,ASTSwitchArrowRHS,GenericNode<JavaNode>,JavaNode,JjtreeNode<JavaNode>,Node,Reportable,TextAvailableNode,TypeNode
- All Known Implementing Classes:
ASTLambdaExpression,ASTMethodReference
A method reference or lambda expression.
-
Nested Class Summary
Nested classes/interfaces inherited from interface net.sourceforge.pmd.lang.java.ast.ASTExpression
ASTExpression.ConstResult -
Field Summary
Fields inherited from interface net.sourceforge.pmd.lang.ast.Node
COORDS_COMPARATOR -
Method Summary
Modifier and TypeMethodDescriptionReturns the method that is overridden in the functional interface.@NonNull JTypeMirrorReturns the type of the functional interface.Methods inherited from interface net.sourceforge.pmd.lang.java.ast.ASTExpression
getConstFoldingResult, getConstValue, getConversionContext, getParenthesisDepth, isCompileTimeConstant, isExpression, isParenthesizedMethods inherited from interface net.sourceforge.pmd.lang.ast.impl.GenericNode
ancestors, ancestorsOrSelf, asStream, children, descendants, descendantsOrSelf, getChild, getFirstChild, getLastChild, getNextSibling, getParent, getPreviousSiblingMethods inherited from interface net.sourceforge.pmd.lang.java.ast.JavaNode
getEnclosingType, getRoot, getSymbolTable, getTypeSystemMethods inherited from interface net.sourceforge.pmd.lang.ast.impl.javacc.JjtreeNode
getFirstToken, getLastToken, tokensMethods inherited from interface net.sourceforge.pmd.lang.ast.Node
acceptVisitor, ancestors, children, compareLocation, descendants, firstChild, getAstInfo, getBeginColumn, getBeginLine, getEndColumn, getEndLine, getImage, getIndexInParent, getLanguageVersion, getNumChildren, getReportLocation, getTextDocument, getUserMap, getXPathAttributesIterator, getXPathNodeName, hasImageEqualTo, isFindBoundaryMethods inherited from interface net.sourceforge.pmd.lang.ast.TextAvailableNode
getOriginalText, getText, getTextRegionMethods inherited from interface net.sourceforge.pmd.lang.java.ast.TypeNode
getTypeMirror
-
Method Details
-
getTypeMirror
@NonNull JTypeMirror getTypeMirror()Returns the type of the functional interface. E.g. instringStream.map(s -> s.isEmpty()), this isjava.util.function.Function<java.lang.String, java.lang.Boolean>.- Specified by:
getTypeMirrorin interfaceTypeNode- Returns:
- The type mirror. Never returns null; if the type is unresolved, returns
TypeSystem.UNKNOWN. - See Also:
-
getFunctionalMethod
JMethodSig getFunctionalMethod()Returns the method that is overridden in the functional interface. E.g. instringStream.map(s -> s.isEmpty()), this isjava.util.function.Function#apply(java.lang.String) -> java.lang.Boolean- See Also:
-