|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--freemarker.template.expression.ListLiteral
Represents a literal List model in a FM-Classic template. The list model is not evaluated until run time, since the model may contain variables or other more complex expressions that can't be determined at compile time.
Constructor Summary | |
ListLiteral(java.util.List values)
Constructor that takes a list of Expression elements to be
evaluated as a list model at run time. |
Method Summary | |
boolean |
equals(java.lang.Object o)
Determines whether this object is equal to the given object. |
TemplateModel |
getAsTemplateModel(TemplateModelRoot modelRoot)
The TemplateModel value of this
Expression . |
java.util.List |
getModelList(TemplateModelRoot modelRoot)
For the benefit of method calls, return the list of arguments as a list of TemplateModel values. |
int |
getType()
Determine the type of result that can be calculated by this expression. |
java.util.List |
getValueList(TemplateModelRoot modelRoot)
For the benefit of method calls, return the list of arguments as a list of String values. |
int |
hashCode()
Returns the hash code for this operator. |
boolean |
isComplete()
Has the ListLiteral been populated? |
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 ListLiteral(java.util.List values)
Expression
elements to be
evaluated as a list model at run time.values
- the values to be added to the ListLiteral
NullPointerException
- the value list is nullMethod Detail |
public TemplateModel getAsTemplateModel(TemplateModelRoot modelRoot) throws TemplateException
TemplateModel
value of this
Expression
.getAsTemplateModel
in interface Expression
modelRoot
- the template model that will be evaluated by the expressionFastList
containing the values in the list modelTemplateException
- the expression could not be evaluated for some reasonpublic java.util.List getModelList(TemplateModelRoot modelRoot) throws TemplateException
TemplateModel
values.modelRoot
- the template model that will be evaluated by the expressionList
of TemplateModel
s contained
in the ListLiteral
TemplateException
- the literal list could not be returnedpublic java.util.List getValueList(TemplateModelRoot modelRoot) throws TemplateException
String
values.modelRoot
- the template model that will be evaluated by the expressionList
of TemplateModel
s contained
in the ListLiteral
TemplateException
- the literal list could not be returnedpublic boolean isComplete()
ListLiteral
been populated?isComplete
in interface Expression
true
if the ListLiteral
is populated,
otherwise false
public int getType()
ExpressionUtils
class.getType
in interface Expression
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 |