| 
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectfreemarker.template.expression.StringLiteral
public final class StringLiteral
Represents a String literal in a FM-Classic template.
| Constructor Summary | |
|---|---|
StringLiteral(java.lang.String value)
Constructor that takes the String value to be generated at run time. | 
|
| Method Summary | |
|---|---|
 boolean | 
equals(java.lang.Object o)
Override the Object.equals method. | 
 TemplateModel | 
getAsTemplateModel(TemplateWriteableHashModel modelRoot)
Retrieve the value of this StringLiteral as a
 TemplateModel. | 
 java.util.Set<ExpressionUtils.ExpressionType> | 
getType()
Determine the type of result that can be calculated by this expression.  | 
 int | 
hashCode()
Retrieve the hash value for this object.  | 
 boolean | 
isComplete()
Does the StringLiteral contain a value? | 
 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.  | 
 java.lang.String | 
toString()
Return the String value of this string literal.  | 
| Methods inherited from class java.lang.Object | 
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait | 
| Constructor Detail | 
|---|
public StringLiteral(java.lang.String value)
String value to be generated at run time.
value - the String value to be generated
java.lang.NullPointerException - the value is null| Method Detail | 
|---|
public TemplateModel getAsTemplateModel(TemplateWriteableHashModel modelRoot)
StringLiteral as a
 TemplateModel.
getAsTemplateModel in interface ExpressionmodelRoot - the template model that will be evaluated by the expression
FastScalar containing the literal Stringpublic boolean isComplete()
StringLiteral contain a value?
isComplete in interface Expressiontrue if there is a value, otherwise falsepublic java.util.Set<ExpressionUtils.ExpressionType> getType()
ExpressionUtils class.
getType in interface Expressionpublic boolean isConstant()
isConstant in interface Expressionpublic java.lang.String toString()
toString in class java.lang.ObjectString objectpublic boolean equals(java.lang.Object o)
Object.equals method.
equals in class java.lang.Objecto - the object to compare against
true if the two 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 | ||||||||