public class FunctionCallNode extends ExpressionNodeBase implements IFunctionCallNode
flagsemptyNodeArray, parentUNKNOWN| Modifier | Constructor and Description |
|---|---|
|
FunctionCallNode(ExpressionNodeBase nameNode)
Constructor.
|
protected |
FunctionCallNode(FunctionCallNode other)
Copy constructor.
|
|
FunctionCallNode(IASToken keywordNew,
ExpressionNodeBase nameNode)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
protected boolean |
buildInnerString(StringBuilder sb)
For debugging only.
|
protected FunctionCallNode |
copy()
Copy the ExpressionNodeBase and its subtree.
|
IExpressionNode[] |
getArgumentNodes()
Returns an array of
IExpressionNode nodes that are passed in as
parameters to this function call |
ContainerNode |
getArgumentsNode()
Get the arguments being passed
|
IASNode |
getChild(int i)
Get a particular child of this node
|
int |
getChildCount()
Get the number of children
|
String |
getFunctionName()
The name of the function being called
|
ExpressionNodeBase |
getNameNode()
The expression being called.
|
KeywordNode |
getNewKeywordNode()
Get the new keyword, if one is present
|
ASTNodeID |
getNodeID()
Get the opcode of this node
|
boolean |
isCallToSuper()
Returns true if this function call is a call to a super expression
foo.super(); |
boolean |
isNewExpression()
Returns true if this function call is part of a new expression
new String(); |
boolean |
isSuperExpression()
Returns true if this function call is part of a super expression
super(); |
protected void |
replaceChild(NodeBase child,
NodeBase target)
Replaces the child with the given target.
|
IDefinition |
resolveCalledExpression(ICompilerProject project)
Resolves the expression being called to a definition.
|
ITypeDefinition |
resolveType(ICompilerProject project)
The type of the result of this expression.
|
protected void |
setChildren(boolean fillInOffsets)
If this node has custom children (names, arguments, etc), shove them into
the list of children.
|
void |
setNewKeywordNode(KeywordNode newNode) |
computeNamespaceReference, copyForInitializer, getASScope, getBaseExpression, getDecorationNode, getDependencyType, getMName, getParentExpression, hasParenthesis, inFilter, inWith, isDynamicExpression, isPackageReference, normalize, resolve, setHasParenthesisisTerminalanalyze, buildStringRecursive, canContinueContainmentSearch, collectImportNodes, combineAttributes, connectedToProjectScope, contains, endAfter, endAfter, endBefore, endBefore, fillInOffsets, getAbsoluteEnd, getAbsoluteStart, getAncestorOfType, getContainingFilePath, getContainingNode, getContainingScope, getEnd, getFileScope, getFileSpecification, getInnerString, getNodeKind, getPackageName, getParent, getScopeNode, getSpanningStart, getStart, getSucceedingNode, getWorkspace, isTransparent, looselyContains, runPostProcess, setParent, span, span, span, startAfter, startAfter, startBefore, startBefore, swapChildren, toString, tryGetOffsetLookup, verifygetColumn, getEndColumn, getEndLine, getLine, getLineColumnString, getOffsetsString, getSourcePath, getSourcePathString, setColumn, setEnd, setEndColumn, setEndLine, setLine, setSourceLocation, setSourcePath, setStart, span, spanclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitcopyForInitializer, hasParenthesis, isDynamicExpression, resolvecontains, getAncestorOfType, getContainingNode, getContainingScope, getFileSpecification, getPackageName, getParent, getSpanningStart, getSucceedingNode, isTerminalgetAbsoluteEnd, getAbsoluteStart, getColumn, getEnd, getEndColumn, getEndLine, getLine, getSourcePath, getStartpublic FunctionCallNode(IASToken keywordNew, ExpressionNodeBase nameNode)
public FunctionCallNode(ExpressionNodeBase nameNode)
protected FunctionCallNode(FunctionCallNode other)
other - The node to copy.public ASTNodeID getNodeID()
IASNodepublic int getChildCount()
IASNodegetChildCount in interface IASNodegetChildCount in class NodeBasepublic IASNode getChild(int i)
IASNodeprotected void setChildren(boolean fillInOffsets)
NodeBasesetChildren in class NodeBaseprotected void replaceChild(NodeBase child, NodeBase target)
NodeBasereplaceChild in class NodeBasechild - the NodeBase to replacetarget - the NodeBase to replace the replacedprotected boolean buildInnerString(StringBuilder sb)
NodeBasebuildOuterString().
It is overridden by subclasses to display optional node-specific
information in the middle of the string, between the node type and the
location information.buildInnerString in class NodeBasepublic ITypeDefinition resolveType(ICompilerProject project)
IExpressionNoderesolveType in interface IExpressionNoderesolveType in class ExpressionNodeBaseproject - The ICompilerProject to use to do lookups.ITypeDefinition of the type this expression results in.protected FunctionCallNode copy()
ExpressionNodeBasecopy in class ExpressionNodeBasepublic boolean isNewExpression()
IFunctionCallNode new String(); isNewExpression in interface IFunctionCallNodepublic ExpressionNodeBase getNameNode()
IFunctionCallNodegetNameNode in interface IFunctionCallNodeIExpressionNodepublic String getFunctionName()
IFunctionCallNodegetFunctionName in interface IFunctionCallNodepublic IDefinition resolveCalledExpression(ICompilerProject project)
IFunctionCallNode
The result may or may not be an IFunctionDefinition.
For example, in f(), f might be
a variable of type Function, and so
this function would return an IVariableDefinition.
As another example, in new Sprite(), Sprite
resolves to a class, not to the constructor for that class, and so
this function would return an IClassDefinition.
resolveCalledExpression in interface IFunctionCallNodeproject - The ICompilerProject to use for lookups.IDefinition or null.public IExpressionNode[] getArgumentNodes()
IFunctionCallNodeIExpressionNode nodes that are passed in as
parameters to this function callgetArgumentNodes in interface IFunctionCallNodeIExpressionNodes or an empty arraypublic boolean isSuperExpression()
IFunctionCallNode super(); isSuperExpression in interface IFunctionCallNodepublic ContainerNode getArgumentsNode()
IFunctionCallNodegetArgumentsNode in interface IFunctionCallNodepublic KeywordNode getNewKeywordNode()
IFunctionCallNodegetNewKeywordNode in interface IFunctionCallNodepublic void setNewKeywordNode(KeywordNode newNode)
public boolean isCallToSuper()
IFunctionCallNodefoo.super(); isCallToSuper in interface IFunctionCallNodeCopyright © 2016 The Apache Software Foundation. All rights reserved.