Class EvaluationContext
- java.lang.Object
-
- org.jdesktop.el.ELContext
-
- org.jdesktop.el.impl.lang.EvaluationContext
-
public final class EvaluationContext extends ELContext
-
-
Field Summary
-
Fields inherited from class org.jdesktop.el.ELContext
UNRESOLVABLE_RESULT
-
-
Constructor Summary
Constructors Constructor Description EvaluationContext(ELContext elContext, FunctionMapper fnMapper, VariableMapper varMapper, Expression expression)EvaluationContext(ELContext elContext, FunctionMapper fnMapper, VariableMapper varMapper, Expression expression, boolean trackResolvedProperties)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclearResolvedProperties()ObjectgetContext(Class key)Returns the context object associated with the given key.ELContextgetELContext()ELResolvergetELResolver()Retrieves theELResolverassociated with this context.ExpressiongetExpression()FunctionMappergetFunctionMapper()Retrieves theFunctionMapperassociated with thisELContext.List<Expression.ResolvedProperty>getResolvedProperties()VariableMappergetVariableMapper()Retrieves theVariableMapperassociated with thisELContext.booleanisPropertyResolved()Returns whether anELResolverhas successfully resolved a given (base, property) pair.voidputContext(Class key, Object contextObject)Associates a context object with thisELContext.voidresolvedIdentifier(Object base, Object property)voidresolvedProperty(Object base, Object property)voidsetPropertyResolved(boolean resolved)Called to indicate that aELResolverhas successfully resolved a given (base, property) pair.
-
-
-
Constructor Detail
-
EvaluationContext
public EvaluationContext(ELContext elContext, FunctionMapper fnMapper, VariableMapper varMapper, Expression expression)
-
EvaluationContext
public EvaluationContext(ELContext elContext, FunctionMapper fnMapper, VariableMapper varMapper, Expression expression, boolean trackResolvedProperties)
-
-
Method Detail
-
getELContext
public ELContext getELContext()
-
getFunctionMapper
public FunctionMapper getFunctionMapper()
Description copied from class:ELContextRetrieves theFunctionMapperassociated with thisELContext.- Specified by:
getFunctionMapperin classELContext- Returns:
- The function mapper to be consulted for the resolution of EL functions.
-
getVariableMapper
public VariableMapper getVariableMapper()
Description copied from class:ELContextRetrieves theVariableMapperassociated with thisELContext.- Specified by:
getVariableMapperin classELContext- Returns:
- The variable mapper to be consulted for the resolution of EL variables.
-
getExpression
public Expression getExpression()
-
getContext
public Object getContext(Class key)
Description copied from class:ELContextReturns the context object associated with the given key.The
ELContextmaintains a collection of context objects relevant to the evaluation of an expression. These context objects are used byELResolvers. This method is used to retrieve the context with the given key from the collection.By convention, the object returned will be of the type specified by the
key. However, this is not required and the key is used strictly as a unique identifier.- Overrides:
getContextin classELContext- Parameters:
key- The unique identifier that was used to associate the context object with thisELContext.- Returns:
- The context object associated with the given key, or null if no such context was found.
-
getELResolver
public ELResolver getELResolver()
Description copied from class:ELContextRetrieves theELResolverassociated with this context.The
ELContextmaintains a reference to theELResolverthat will be consulted to resolve variables and properties during an expression evaluation. This method retrieves the reference to the resolver.Once an
ELContextis constructed, the reference to theELResolverassociated with the context cannot be changed.- Specified by:
getELResolverin classELContext- Returns:
- The resolver to be consulted for variable and property resolution during expression evaluation.
-
isPropertyResolved
public boolean isPropertyResolved()
Description copied from class:ELContextReturns whether anELResolverhas successfully resolved a given (base, property) pair.The
CompositeELResolverchecks this property to determine whether it should consider or skip other component resolvers.- Overrides:
isPropertyResolvedin classELContext- Returns:
- true if the property has been resolved, or false if not.
- See Also:
CompositeELResolver
-
putContext
public void putContext(Class key, Object contextObject)
Description copied from class:ELContextAssociates a context object with thisELContext.The
ELContextmaintains a collection of context objects relevant to the evaluation of an expression. These context objects are used byELResolvers. This method is used to add a context object to that collection.By convention, the
contextObjectwill be of the type specified by thekey. However, this is not required and the key is used strictly as a unique identifier.- Overrides:
putContextin classELContext- Parameters:
key- The key used by an @{link ELResolver} to identify this context object.contextObject- The context object to add to the collection.
-
setPropertyResolved
public void setPropertyResolved(boolean resolved)
Description copied from class:ELContextCalled to indicate that aELResolverhas successfully resolved a given (base, property) pair.The
CompositeELResolverchecks this property to determine whether it should consider or skip other component resolvers.- Overrides:
setPropertyResolvedin classELContext- Parameters:
resolved- true if the property has been resolved, or false if not.- See Also:
CompositeELResolver
-
clearResolvedProperties
public void clearResolvedProperties()
-
getResolvedProperties
public List<Expression.ResolvedProperty> getResolvedProperties()
-
-