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 classExpressionBuilder.NodeSoftReferenceprivate static classExpressionBuilder.SoftConcurrentHashMap
-
Field Summary
Fields Modifier and Type Field Description private static ExpressionBuilder.SoftConcurrentHashMapcacheprivate java.lang.Stringexpressionprivate FunctionMapperfnMapperprivate VariableMappervarMapper
-
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 Nodebuild()MethodExpressioncreateMethodExpression(java.lang.Class expectedReturnType, java.lang.Class[] expectedParamTypes)static NodecreateNode(java.lang.String expr)private static NodecreateNodeInternal(java.lang.String expr)ValueExpressioncreateValueExpression(java.lang.Class expectedType)private voidprepare(Node node)Scan the expression nodes and captures the functions and variables used in this expression.voidvisit(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 Node createNode(java.lang.String expr) throws ELException
- Throws:
ELException
-
createNodeInternal
private static 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:
visitin 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
-
-