Class JMethodCall
java.lang.Object
com.inductiveautomation.snap.javatree.JNode
com.inductiveautomation.snap.javatree.JExpr
com.inductiveautomation.snap.javatree.JMethodCall
This class represents a method call in code.
-
Nested Class Summary
Nested classes/interfaces inherited from class com.inductiveautomation.snap.javatree.JExpr
JExpr.AllocationExpr, JExpr.ArrayIndexExpr, JExpr.CastExpr
-
Constructor Summary
ConstructorsConstructorDescriptionCreates a new method call.JMethodCall
(JIdentifier anId, List theArgs) Creates a new method call for given identifier (method name) and arg list. -
Method Summary
Modifier and TypeMethodDescriptionClass[]
Returns the arg classes.getArgs()
Returns the method arguments.protected String
Tries to resolve the class name for this node.Returns the identifier.Returns the method by querying parent class ref.static JMethodCall
getMethodCall
(JNode aNode) Returns the method call parent of given node, if available.static 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 String
Resolves the name from Identifier or Method.Returns the part name.void
Sets the method arguments.void
setIdentifier
(JIdentifier anId) Sets the identifier.Methods inherited from class com.inductiveautomation.snap.javatree.JExpr
getParentClassRef, getParentExpr
Methods inherited from class com.inductiveautomation.snap.javatree.JNode
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
-
Constructor Details
-
JMethodCall
public JMethodCall()Creates a new method call. -
JMethodCall
Creates a new method call for given identifier (method name) and arg list.
-
-
Method Details
-
getIdentifier
Returns the identifier. -
setIdentifier
Sets the identifier. -
getArgs
Returns the method arguments. -
setArgs
Sets the method arguments. -
getArgClasses
Returns the arg classes. -
getMethod
Returns the method by querying parent class ref. -
getNameImpl
Resolves the name from Identifier or Method.- Overrides:
getNameImpl
in classJNode
-
getClassNameImpl
Tries to resolve the class name for this node.- Overrides:
getClassNameImpl
in classJNode
-
getNodeString
Returns the part name.- Overrides:
getNodeString
in classJNode
-
getMethodCall
Returns the method call parent of given node, if available. -
getMethodCallArgClass
Return the method call arg class of node, if node is MethodCall arg. -
getMethodCallArgIndex
Return the method call arg index of node.
-