freemarker.template.expression
Class ExpressionBuilder

java.lang.Object
  extended by freemarker.template.expression.ExpressionBuilder

public final class ExpressionBuilder
extends java.lang.Object

A TemplateParser can use this class's static buildExpression(java.util.List) method to build a complete Expression or sub-expression from a List of Expressions.

Version:
$Id: ExpressionBuilder.java 1101 2013-04-01 04:17:32Z run2000 $

Nested Class Summary
static class ExpressionBuilder.Precedence
          Order of operator precedence.
 
Method Summary
static Expression buildExpression(java.util.List<Expression> elements)
          Builds an Expression or sub-Expression.
static Variable buildVariable(java.util.List<Variable> elements)
          Builds a complete Variable.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

buildExpression

public static Expression buildExpression(java.util.List<Expression> 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

buildVariable

public static Variable buildVariable(java.util.List<Variable> 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