public class JMethodCall extends JExpr
JExpr.AllocationExpr, JExpr.ArrayIndexExpr, JExpr.CastExpr
Constructor and Description |
---|
JMethodCall()
Creates a new method call.
|
JMethodCall(JIdentifier anId,
java.util.List theArgs)
Creates a new method call for given identifier (method name) and arg list.
|
Modifier and Type | Method and Description |
---|---|
java.lang.Class[] |
getArgClasses()
Returns the arg classes.
|
java.util.List<JExpr> |
getArgs()
Returns the method arguments.
|
protected java.lang.String |
getClassNameImpl()
Tries to resolve the class name for this node.
|
JIdentifier |
getIdentifier()
Returns the identifier.
|
java.lang.reflect.Method |
getMethod()
Returns the method by querying parent class ref.
|
static JMethodCall |
getMethodCall(JNode aNode)
Returns the method call parent of given node, if available.
|
static java.lang.Class |
getMethodCallArgClass(JNode aNode)
Return the method call arg class of node, if node is MethodCall arg.
|
static int |
getMethodCallArgIndex(JMethodCall aMethodCall,
JNode aNode)
Return the method call arg index of node.
|
protected java.lang.String |
getNameImpl()
Resolves the name from Identifier or Method.
|
java.lang.String |
getNodeString()
Returns the part name.
|
void |
setArgs(java.util.List<JExpr> theArgs)
Sets the method arguments.
|
void |
setIdentifier(JIdentifier anId)
Sets the identifier.
|
getParentClassRef, getParentExpr
addChild, buildChildren, getBlock, getChild, getChildCount, getChildren, getClassLoader, getClassName, getClassRef, getClassRefImpl, getEnclosingClassDecl, getEnclosingMemberDecl, getEnclosingMethodDecl, getEnd, getEndToken, getFile, getJClass, getLineIndex, getName, getNodeAtCharIndex, getNodeFields, getNodeFieldsImpl, getNodeParents, getNodePath, getOthers, getParent, getParent, getReferencedClasses, getReferencedClassNames, getReferencedClassNames, getReferencedClassNames, getStart, getStartToken, getString, getVariableDecl, getVariableDeclInside, getVariableDecls, isBlock, setClassName, setClassRef, setEndToken, setJClass, setParent, setStartToken, toString
public JMethodCall()
public JMethodCall(JIdentifier anId, java.util.List theArgs)
public JIdentifier getIdentifier()
public void setIdentifier(JIdentifier anId)
public java.util.List<JExpr> getArgs()
public void setArgs(java.util.List<JExpr> theArgs)
public java.lang.Class[] getArgClasses()
public java.lang.reflect.Method getMethod()
protected java.lang.String getNameImpl()
getNameImpl
in class JNode
protected java.lang.String getClassNameImpl()
getClassNameImpl
in class JNode
public java.lang.String getNodeString()
getNodeString
in class JNode
public static JMethodCall getMethodCall(JNode aNode)
public static java.lang.Class getMethodCallArgClass(JNode aNode)
public static int getMethodCallArgIndex(JMethodCall aMethodCall, JNode aNode)