public class MethodCall extends Call
NO_ARGS, parameterExpressions
Constructor and Description |
---|
MethodCall(Expression self)
Creates a new instance and specifies the expression on which the method is invoked.
|
Modifier and Type | Method and Description |
---|---|
void |
bindToMethod(parsii.tokenizer.Char position,
CompilationContext context,
String name)
Tries to find a matching method for the given name, type of "self" and parameter types.
|
Expression |
copy()
Creates a deep copy of the expression which can be modified without affecting the original expression.
|
Object |
eval(LocalRenderContext ctx)
Evaluates the expression into an object using the given context.
|
Class<?> |
getType()
Returns the Java class of the objects yielded by this expression.
|
Expression |
propagateVisitor(ExpressionVisitor visitor)
Visits all child nodes and then the node itself.
|
Expression |
reduce()
Reduces and optimizes the expression if possible.
|
String |
toString() |
copyParametersTo, isConstant, setParameters
public MethodCall(Expression self)
self
- the expression on which the method is invoked.public Expression propagateVisitor(ExpressionVisitor visitor)
Expression
propagateVisitor
in interface Expression
propagateVisitor
in class Call
visitor
- the visitor to invoke for all child nodes and on the node itselfpublic Expression reduce()
Expression
public Expression copy()
Expression
public Object eval(LocalRenderContext ctx)
Expression
ctx
- the current rendering contextpublic Class<?> getType()
Expression
public void bindToMethod(parsii.tokenizer.Char position, CompilationContext context, String name)
position
- the position where the invocation was declaredcontext
- the compilation context for error reportingname
- the name of the method to findCopyright © 2018. All rights reserved.