Class TemplateEngine.ExpressionBuilder
java.lang.Object
org.apache.commons.jexl3.internal.TemplateEngine.ExpressionBuilder
- Enclosing class:
TemplateEngine
A helper class to build expressions.
Keeps count of sub-expressions by type.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final int[]
Per TemplateExpression type counters.private final List
<TemplateEngine.TemplateExpression> The list of expressions. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription(package private) void
Adds an TemplateExpression to the list of expressions, maintain per-type counts.(package private) TemplateEngine.TemplateExpression
build
(TemplateEngine el, TemplateEngine.TemplateExpression source) Builds an TemplateExpression from a source, performs checks.toString()
(package private) StringBuilder
toString
(StringBuilder error) Base for to-string.
-
Field Details
-
counts
private final int[] countsPer TemplateExpression type counters. -
expressions
The list of expressions.
-
-
Constructor Details
-
ExpressionBuilder
ExpressionBuilder(int size) Creates a builder.- Parameters:
size
- the initial TemplateExpression array size
-
-
Method Details
-
add
Adds an TemplateExpression to the list of expressions, maintain per-type counts.- Parameters:
expr
- the TemplateExpression to add
-
build
TemplateEngine.TemplateExpression build(TemplateEngine el, TemplateEngine.TemplateExpression source) Builds an TemplateExpression from a source, performs checks.- Parameters:
el
- the unified el instancesource
- the source TemplateExpression- Returns:
- an TemplateExpression
-
toString
-
toString
Base for to-string.- Parameters:
error
- the builder to fill- Returns:
- the builder
-