Package freemarker.template.expression

The mechanics of FM-Classic expressions are implemented in this package.

See:
          Description

Interface Summary
Binary An interface for binary operators.
Expression An Expression can return a TemplateModel value.
Operator Interface that represents an operator expression.
Unary An interface for unary operators.
Variable An interface for expressions that get their values from the data model, and for those data models that can be set to a value.
 

Class Summary
AbstractBinary Abstract class that implements most of the surrounding machinery needed for binary expressions.
And Performs a logical "and" operation on two template models.
BooleanLiteral Represents a boolean literal in a FM-Classic template.
Constant Represents a constant value within an expression.
Divide A division operator.
Dot The dot operator.
DynamicKeyName A unary operator that uses the string value of an expression as a hash key.
EmptyLiteral Represents an empty literal in a FM-Classic template.
Equals Performs an equality test on two template models.
ExpressionBuilder A TemplateParser can use this class's static ExpressionBuilder.buildExpression(java.util.List) method to build a complete Expression or sub-expression from a List of Expressions.
ExpressionCache A simple expression cache.
ExpressionUtils Utility methods for evaluating expressions.
GreaterThan A greater-than operator.
GreaterThanOrEquals A greater-than-or-equals operator.
HashLiteral Represents a literal Hash model in a FM-Classic template.
Identifier An identifer in a variable.
Lambda Implements a Lambda expression.
LambdaMethod Implements an instance of a lambda expression.
LessThan A less-than operator.
LessThanOrEquals A less-than-or-equals operator.
ListLiteral Represents a literal List model in a FM-Classic template.
ListRange An expression that represents a indexModel of list values.
MethodCall A unary operator that calls a TemplateMethodModel.
Minus A subtraction operator.
Modulo A modulus operator.
Multiply A multiplication operator.
Not Performs a logical "not" operation on a given template model.
NotEquals Performs an inequality test on two template models.
NumberLiteral Represents a number literal in a FM-Classic template.
Or Performs a logical "or" operation on two template models.
Plus An addition operator.
StringLiteral Represents a String literal in a FM-Classic template.
Ternary An expression that represents a conditional ternary operator.
 

Enum Summary
ExpressionBuilder.Precedence Order of operator precedence.
ExpressionUtils.ExpressionType Enumerates the types of results that an expression can generate.
Unary.Association Indicates the operator association for this unary expression.
 

Package freemarker.template.expression Description

The mechanics of FM-Classic expressions are implemented in this package. Expressions are represented as a syntax tree, of which each node implements the Expression interface. Expressions can then be divided up in two ways:

Runtime expression elements are a subset of the parser symbols. The special cases are the symbols generated for parenthesized operators. These are emitted by the parser in order for the ExpressionBuilder class to generate the expression tree with the correct hierarchy.

Other expression elements are either binary or unary operators, indicating how they should be associated with the operators around them. Operator precedence is handled by the ExpressionBuilder when expressions are constructed.