freemarker.template.expression
Class ExpressionBuilder
java.lang.Object
|
+--freemarker.template.expression.ExpressionBuilder
- public final class ExpressionBuilder
- extends java.lang.Object
A TemplateParser can use this class's static build(java.util.List)
method to build a complete Expression
or sub-expression from a
List of ExpressionElement
s.
- Version:
- $Id: ExpressionBuilder.java,v 1.20 2003/11/27 07:07:12 run2000 Exp $
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
build
public static Expression build(java.util.List elements)
throws ParseException
- Builds an
Expression
.
- Parameters:
elements
- a List
of ExpressionElement
s.- Returns:
- the complete
Expression
. - Throws:
ParseException
- the builder could not create a valid Expression
buildExpression
public static Expression buildExpression(java.util.List elements)
throws ParseException
- Builds an
Expression
or sub-Expression
.
- Parameters:
elements
- a List
of ExpressionElements
.- Returns:
- the complete
Expression
or
sub-Expression
. - Throws:
ParseException
- the builder could not create a valid Expression
groupParens
public static void groupParens(java.util.List elements)
throws ParseException
- Encapsulates parenthetical expressions by putting them in
sub-
List
s.
- Parameters:
elements
- a List
of ExpressionElements
.- Throws:
ParseException
- the builder could not create a valid Expression
buildVariable
public static Expression buildVariable(java.util.List elements)
throws ParseException
- Builds a complete
Variable
.
- Parameters:
elements
- a List
of ExpressionElements
.- Returns:
- the complete
Variable
. - Throws:
ParseException
- the builder could not create a valid Variable