Package com.sun.el.lang
Class ExpressionBuilder
- java.lang.Object
-
- com.sun.el.lang.ExpressionBuilder
-
- All Implemented Interfaces:
NodeVisitor
public final class ExpressionBuilder extends java.lang.Object implements NodeVisitor
- Version:
- $Change: 181177 $$DateTime: 2001/06/26 08:45:09 $$Author: kchung $
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description private static class
ExpressionBuilder.NodeSoftReference
private static class
ExpressionBuilder.SoftConcurrentHashMap
-
Field Summary
Fields Modifier and Type Field Description private static ExpressionBuilder.SoftConcurrentHashMap
cache
private java.lang.String
expression
private FunctionMapper
fnMapper
private VariableMapper
varMapper
-
Constructor Summary
Constructors Constructor Description ExpressionBuilder(java.lang.String expression, ELContext ctx)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description private Node
build()
MethodExpression
createMethodExpression(java.lang.Class expectedReturnType, java.lang.Class[] expectedParamTypes)
static Node
createNode(java.lang.String expr)
private static Node
createNodeInternal(java.lang.String expr)
ValueExpression
createValueExpression(java.lang.Class expectedType)
private void
prepare(Node node)
Scan the expression nodes and captures the functions and variables used in this expression.void
visit(Node node)
-
-
-
Field Detail
-
cache
private static final ExpressionBuilder.SoftConcurrentHashMap cache
-
fnMapper
private FunctionMapper fnMapper
-
varMapper
private VariableMapper varMapper
-
expression
private java.lang.String expression
-
-
Constructor Detail
-
ExpressionBuilder
public ExpressionBuilder(java.lang.String expression, ELContext ctx) throws ELException
- Throws:
ELException
-
-
Method Detail
-
createNode
public static final Node createNode(java.lang.String expr) throws ELException
- Throws:
ELException
-
createNodeInternal
private static final Node createNodeInternal(java.lang.String expr) throws ELException
- Throws:
ELException
-
prepare
private void prepare(Node node) throws ELException
Scan the expression nodes and captures the functions and variables used in this expression. This ensures that any changes to the functions or variables mappings during the expression will not affect the evaluation of this expression, as the functions and variables are bound and resolved at parse time, as specified in the spec.- Throws:
ELException
-
build
private Node build() throws ELException
- Throws:
ELException
-
visit
public void visit(Node node) throws ELException
- Specified by:
visit
in interfaceNodeVisitor
- Throws:
ELException
-
createValueExpression
public ValueExpression createValueExpression(java.lang.Class expectedType) throws ELException
- Throws:
ELException
-
createMethodExpression
public MethodExpression createMethodExpression(java.lang.Class expectedReturnType, java.lang.Class[] expectedParamTypes) throws ELException
- Throws:
ELException
-
-