|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectfreemarker.template.expression.MethodCall
public final class MethodCall
A unary operator that calls a TemplateMethodModel. It associates with other
Variable expressions to its left.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from interface freemarker.template.expression.Unary |
|---|
Unary.Association |
| Constructor Summary | |
|---|---|
MethodCall(java.util.List<Expression> arguments)
Constructor that takes a List of Expressions
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 Expressions to be evaluated at call time. |
Unary.Association |
getAssociationType()
Retrieve the operator association for this operator. |
TemplateModel |
getAsTemplateModel(TemplateWriteableHashModel modelRoot)
The TemplateModel value of this
method call. |
java.lang.String |
getName(TemplateWriteableHashModel modelRoot)
Retrieve the name of this portion of the variable. |
ExpressionBuilder.Precedence |
getPrecedence()
Return the precedence for this operator to the caller. |
Expression |
getTarget()
Retrieves the target of this MethodCall operator. |
java.util.Set<ExpressionUtils.ExpressionType> |
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? |
boolean |
isConstant()
Determine whether result calculated by this expression is a constant value. |
Expression |
resolveExpression()
Resolves the current expression, possibly into a different expression object. |
void |
setTarget(Expression target)
Sets the target of this MethodCall operator. |
void |
setTemplateModel(TemplateWriteableHashModel modelRoot,
TemplateModel value)
A setter that calls a method model. |
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<Expression> arguments)
List of Expressions
to be evaluated at method call time.
arguments - a List of Expressions
java.lang.NullPointerException - the argument list is null| Method Detail |
|---|
public ListLiteral getArguments()
Expressions to be evaluated at call time.
ListLiteral of arguments to be evaluated
public java.lang.String getName(TemplateWriteableHashModel modelRoot)
throws TemplateException
getName in interface VariablemodelRoot - the model to be used in cases where the variable is
the result of an Expression.
TemplateException - the name could not be determined
public TemplateModel getAsTemplateModel(TemplateWriteableHashModel modelRoot)
throws TemplateException
TemplateModel value of this
method call.
getAsTemplateModel in interface ExpressionmodelRoot - the template model that will be evaluated by the expression
TemplateModel returned by the method call
TemplateException - the expression could not be evaluated for some reason
public void setTemplateModel(TemplateWriteableHashModel modelRoot,
TemplateModel value)
throws TemplateException
setTemplateModel in interface VariablemodelRoot - the root model, for determining contextvalue - the value to be assigned
TemplateException - there was a problem performing the assignmentpublic boolean isComplete()
isComplete in interface Expressiontrue if both target and arguments are specified,
otherwise falsepublic java.util.Set<ExpressionUtils.ExpressionType> getType()
ExpressionUtils class.
getType in interface Expressionpublic boolean isConstant()
isConstant in interface Expressionpublic Unary.Association getAssociationType()
getAssociationType in interface UnaryPOSTFIX.public void setTarget(Expression target)
MethodCall operator.
setTarget in interface Unaryjava.lang.IllegalArgumentException - the target is of the wrong type
for this operator.public Expression getTarget()
MethodCall operator.
Expression representing the TemplateMethodModel
to be calledpublic ExpressionBuilder.Precedence getPrecedence()
getPrecedence in interface Operatorpublic java.lang.String toString()
toString in class java.lang.ObjectString representation of this expressionpublic boolean equals(java.lang.Object o)
equals in class java.lang.Objecto - the object to be compared with
true if the objects are equal, otherwise
falsepublic int hashCode()
hashCode in class java.lang.Objectpublic Expression resolveExpression()
readResolve method. Situations where this may be used are:
resolveExpression in interface Expression
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||