|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--freemarker.template.expression.MethodCall
A unary operator that calls a TemplateMethodModel. It associates with other
Variable
expressions to its left.
Fields inherited from interface freemarker.template.expression.Unary |
POSTFIX, PREFIX |
Constructor Summary | |
MethodCall(java.util.List arguments)
Constructor that takes a List of Expression s
to be evaluated at method call time. |
Method Summary | |
boolean |
equals(java.lang.Object o)
Determines whether this object is equal to the given object. |
ListLiteral |
getArguments()
Retrieve the Expression s to be evaluated at call time. |
int |
getAssociationType()
Retrieve the operator association for this operator. |
TemplateModel |
getAsTemplateModel(TemplateModelRoot modelRoot)
The TemplateModel value of this
method call. |
java.lang.String |
getName(TemplateModelRoot modelRoot)
Retrieve the name of this portion of the variable. |
int |
getOperatorClass()
Return the type of operator this is to the caller. |
Expression |
getTarget()
Retrieves the target of this MethodCall operator. |
int |
getType()
Determine the type of result that can be calculated by this expression. |
int |
hashCode()
Returns the hash code for this operator. |
boolean |
isComplete()
Are both the target and the arguments specified? |
void |
setTarget(Expression target)
Sets the target of this MethodCall operator. |
java.lang.String |
toString()
Returns a string representation of the object. |
Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
public MethodCall(java.util.List arguments)
List
of Expression
s
to be evaluated at method call time.arguments
- a List
of Expression
sNullPointerException
- the argument list is nullMethod Detail |
public ListLiteral getArguments()
Expression
s to be evaluated at call time.ListLiteral
of arguments to be evaluatedpublic java.lang.String getName(TemplateModelRoot modelRoot) throws TemplateException
getName
in interface Variable
modelRoot
- the model to be used in cases where the variable is
the result of an Expression
.TemplateException
- the name could not be determinedpublic TemplateModel getAsTemplateModel(TemplateModelRoot modelRoot) throws TemplateException
TemplateModel
value of this
method call.getAsTemplateModel
in interface Expression
modelRoot
- the template model that will be evaluated by the expressionTemplateModel
returned by the method callTemplateException
- the expression could not be evaluated for some reasonpublic boolean isComplete()
isComplete
in interface Expression
true
if both target and arguments are specified,
otherwise false
public int getType()
ExpressionUtils
class.getType
in interface Expression
public int getAssociationType()
getAssociationType
in interface Unary
POSTFIX
.public void setTarget(Expression target)
MethodCall
operator.setTarget
in interface Unary
java.lang.IllegalArgumentException
- the target is of the wrong type
for this operator.public Expression getTarget()
MethodCall
operator.Expression
representing the TemplateMethodModel
to be calledpublic int getOperatorClass()
getOperatorClass
in interface Operator
public java.lang.String toString()
toString
in class java.lang.Object
String
representation of this expressionpublic boolean equals(java.lang.Object o)
equals
in class java.lang.Object
o
- the object to be compared withtrue
if the objects are equal, otherwise
false
public int hashCode()
hashCode
in class java.lang.Object
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |