|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--freemarker.template.expression.Identifier
An identifer in a variable. Can be used stand-alone to represent a
variable in the root model, or combined with the Dot
operator
to represent models contained within hash models.
Method Summary | |
boolean |
equals(java.lang.Object o)
Tests the equality of two Identifier s. |
TemplateModel |
getAsTemplateModel(TemplateModelRoot modelRoot)
Gets the identifier's referent in modelRoot. |
static Identifier |
getInstance(java.lang.String name)
Retrieve a canonical instance of the identifier for the given name. |
java.lang.String |
getName()
Retrieve the name of the identifier. |
java.lang.String |
getName(TemplateModelRoot modelRoot)
Retrieve the name of this Identifier . |
int |
getType()
Determine the type of result that can be calculated by this expression. |
int |
hashCode()
Returns a hash code value for the Identifier . |
boolean |
isComplete()
Has the identifier's name been assigned? |
java.lang.String |
toString()
Returns the name of the identifier as a String . |
Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Method Detail |
public static Identifier getInstance(java.lang.String name)
name
- the name of the identifierIdentifier
for the given namejava.lang.IllegalArgumentException
- Identifier name was nullpublic java.lang.String getName()
public java.lang.String getName(TemplateModelRoot modelRoot)
Identifier
.getName
in interface Variable
modelRoot
- the TemplateModelRoot
used to evaluate
the name of the identifierpublic boolean isComplete()
isComplete
in interface Expression
true
if the identifier is named, otherwise false
public int getType()
ExpressionUtils
class.getType
in interface Expression
public TemplateModel getAsTemplateModel(TemplateModelRoot modelRoot) throws TemplateException
getAsTemplateModel
in interface Expression
modelRoot
- the root node of the data model.TemplateModel
that the variable refers to.public java.lang.String toString()
String
.toString
in class java.lang.Object
public boolean equals(java.lang.Object o)
Identifier
s.equals
in class java.lang.Object
true
if the identifiers are equal, otherwise false
public int hashCode()
Identifier
.hashCode
in class java.lang.Object
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |