|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectfreemarker.template.expression.Lambda
public final class Lambda
Implements a Lambda expression. A lambda evaluates to a method model, possibly anonymous, and takes the current template model root as its context. In this respect, a lambda evaluates to a closure.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from interface freemarker.template.expression.Unary |
|---|
Unary.Association |
| Constructor Summary | |
|---|---|
Lambda(java.util.List<Identifier> arguments)
Constructor that takes a list of arguments to be supplied to the lambda expression. |
|
| Method Summary | |
|---|---|
boolean |
equals(java.lang.Object o)
Determines whether this object is equal to the given object. |
Unary.Association |
getAssociationType()
Determines the operator association of the unary operation. |
TemplateModel |
getAsTemplateModel(TemplateWriteableHashModel modelRoot)
The TemplateModel value of this
Expression. |
ExpressionBuilder.Precedence |
getPrecedence()
Return the precedence for this operator to the caller. |
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()
Is the target 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 lambda 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 Lambda(java.util.List<Identifier> arguments)
arguments - the list of variable arguments to be supplied to the
lambda expression| Method Detail |
|---|
public TemplateModel getAsTemplateModel(TemplateWriteableHashModel modelRoot)
throws TemplateException
TemplateModel value of this
Expression.
getAsTemplateModel in interface ExpressionmodelRoot - the template model that will be evaluated by the expression
TemplateException - the expression could not be evaluated for some reasonpublic boolean isComplete()
isComplete in interface Expressiontrue if the target is 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 UnaryPREFIX or POSTFIX.public void setTarget(Expression target)
lambda operator.
setTarget in interface Unarytarget - the target of this operator
java.lang.NullPointerException - the expression is nullpublic 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.Object
public Expression resolveExpression()
throws TemplateException
readResolve method. Situations where this may be used are:
resolveExpression in interface ExpressionTemplateException
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||