Interface InvocationNode
-
- All Superinterfaces:
GenericNode<JavaNode>
,JavaNode
,JjtreeNode<JavaNode>
,MethodUsage
,Node
,Reportable
,TextAvailableNode
,TypeNode
- All Known Implementing Classes:
ASTConstructorCall
,ASTEnumConstant
,ASTExplicitConstructorInvocation
,ASTMethodCall
public interface InvocationNode extends TypeNode, MethodUsage
Groups method and constructor call, together, as well as explicit constructor invocation statements, and enum constant declarations. Those last two are included, because they are special syntax to call a constructor.The arguments of the invocation are said to be in an "invocation context", which influences what conversions they are subject to. It also means the type of the arguments may depend on the resolution of the compile-time declaration of this node.
-
-
Field Summary
-
Fields inherited from interface net.sourceforge.pmd.lang.ast.Node
COORDS_COMPARATOR
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description @Nullable ASTArgumentList
getArguments()
Returns the node representing the list of arguments passed to the invocation.@Nullable ASTTypeArguments
getExplicitTypeArguments()
Returns the explicit type arguments if they exist.default JMethodSig
getMethodType()
Gets the type of the method or constructor that is called by this node.OverloadSelectionResult
getOverloadSelectionInfo()
Returns information about the overload selection for this call.-
Methods inherited from interface net.sourceforge.pmd.lang.ast.impl.GenericNode
ancestors, ancestorsOrSelf, asStream, children, descendants, descendantsOrSelf, getChild, getFirstChild, getLastChild, getNextSibling, getParent, getPreviousSibling
-
Methods inherited from interface net.sourceforge.pmd.lang.java.ast.JavaNode
getEnclosingType, getRoot, getSymbolTable, getTypeSystem
-
Methods inherited from interface net.sourceforge.pmd.lang.ast.impl.javacc.JjtreeNode
getFirstToken, getLastToken, tokens
-
Methods inherited from interface net.sourceforge.pmd.lang.java.ast.MethodUsage
getMethodName
-
Methods 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, isFindBoundary
-
Methods inherited from interface net.sourceforge.pmd.lang.ast.TextAvailableNode
getOriginalText, getText, getTextRegion
-
Methods inherited from interface net.sourceforge.pmd.lang.java.ast.TypeNode
getTypeMirror, getTypeMirror
-
-
-
-
Method Detail
-
getArguments
@Nullable ASTArgumentList getArguments()
Returns the node representing the list of arguments passed to the invocation. Can be null if this is anASTEnumConstant
.
-
getExplicitTypeArguments
@Nullable ASTTypeArguments getExplicitTypeArguments()
Returns the explicit type arguments if they exist.
-
getMethodType
default JMethodSig getMethodType()
Gets the type of the method or constructor that is called by this node. SeeOverloadSelectionResult.getMethodType()
.
-
getOverloadSelectionInfo
OverloadSelectionResult getOverloadSelectionInfo()
Returns information about the overload selection for this call. Be aware, that selection might have failed (OverloadSelectionResult.isFailed()
).
-
-