public class ASTPtMethodCallNode extends ASTPtRootNode
To allow extension of the parser capabilities without modifying the kernel code, method calls on Tokens are supported with the following syntax (token).methodName(comma separated arguments).
Method arguments are processed as described in ASTPtFunctionApplicationNode
. However, to allow element-by-element
method calls on ArrayTokens, the following sequence is followed here
to find a method to execute:
ASTPtRootNode
,
PtParser
,
Token
Modifier and Type | Field and Description |
---|---|
protected java.lang.String |
_methodName
Need to store the method name of the method call.
|
_children, _id, _isConstant, _parent, _ptToken, _ptType
Constructor and Description |
---|
ASTPtMethodCallNode(int id) |
ASTPtMethodCallNode(PtParser p,
int id) |
Modifier and Type | Method and Description |
---|---|
java.lang.String |
getMethodName()
Return the name of the method invoked by this node.
|
void |
jjtClose()
This method is called after all the child nodes have been
added.
|
void |
visit(ParseTreeVisitor visitor)
Traverse this node with the given visitor.
|
clone, displayParseTree, evaluateParseTree, getToken, getType, isCongruent, isConstant, isEvaluated, jjtAddChild, jjtGetChild, jjtGetNumChildren, jjtGetParent, jjtOpen, jjtSetParent, setConstant, setToken, setType, toString, toString
protected java.lang.String _methodName
public ASTPtMethodCallNode(int id)
public ASTPtMethodCallNode(PtParser p, int id)
public java.lang.String getMethodName()
public void jjtClose()
Node
jjtClose
in interface Node
jjtClose
in class ASTPtRootNode
public void visit(ParseTreeVisitor visitor) throws IllegalActionException
visit
in class ASTPtRootNode
visitor
- The visitor.IllegalActionException
- Always thrown in this base
class the visit() method is not implemented here.