freemarker.template.expression
Enum ExpressionUtils.ExpressionType

java.lang.Object
  extended by java.lang.Enum<ExpressionUtils.ExpressionType>
      extended by freemarker.template.expression.ExpressionUtils.ExpressionType
All Implemented Interfaces:
java.io.Serializable, java.lang.Comparable<ExpressionUtils.ExpressionType>
Enclosing class:
ExpressionUtils

public static enum ExpressionUtils.ExpressionType
extends java.lang.Enum<ExpressionUtils.ExpressionType>

Enumerates the types of results that an expression can generate. Mainly used for sanity checking against instruction types or parent expressions, or for pre-computing constant expressions.


Enum Constant Summary
HASH
          The expression can return type Hash.
LIST
          The expression can return type List.
METHOD
          The expression can return type Method.
NUMBER
          The expression can return type Number.
STRING
          The expression can return type String.
TRANSFORM
          The expression can return type Transform.
 
Method Summary
static ExpressionUtils.ExpressionType valueOf(java.lang.String name)
          Returns the enum constant of this type with the specified name.
static ExpressionUtils.ExpressionType[] values()
          Returns an array containing the constants of this enum type, in the order they are declared.
 
Methods inherited from class java.lang.Enum
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Enum Constant Detail

STRING

public static final ExpressionUtils.ExpressionType STRING
The expression can return type String.


NUMBER

public static final ExpressionUtils.ExpressionType NUMBER
The expression can return type Number.


LIST

public static final ExpressionUtils.ExpressionType LIST
The expression can return type List.


HASH

public static final ExpressionUtils.ExpressionType HASH
The expression can return type Hash.


TRANSFORM

public static final ExpressionUtils.ExpressionType TRANSFORM
The expression can return type Transform.


METHOD

public static final ExpressionUtils.ExpressionType METHOD
The expression can return type Method.

Method Detail

values

public static ExpressionUtils.ExpressionType[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
for (ExpressionUtils.ExpressionType c : ExpressionUtils.ExpressionType.values())
    System.out.println(c);

Returns:
an array containing the constants of this enum type, in the order they are declared

valueOf

public static ExpressionUtils.ExpressionType valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)

Parameters:
name - the name of the enum constant to be returned.
Returns:
the enum constant with the specified name
Throws:
java.lang.IllegalArgumentException - if this enum type has no constant with the specified name
java.lang.NullPointerException - if the argument is null