public class StandardELContext extends ELContext
Constructor and Description |
---|
StandardELContext(ELContext context)
Construct a StandardELContext from another ELContext.
|
StandardELContext(ExpressionFactory factory)
Construct a default ELContext for a stand-alone environment.
|
Modifier and Type | Method and Description |
---|---|
void |
addELResolver(ELResolver cELResolver)
Add a custom ELResolver to the context.
|
Object |
getContext(Class key)
Returns the context object associated with the given key.
|
ELResolver |
getELResolver()
Construct (if needed) and return a default ELResolver.
|
FunctionMapper |
getFunctionMapper()
Construct (if needed) and return a default FunctionMapper.
|
VariableMapper |
getVariableMapper()
Construct (if needed) and return a default VariableMapper() {
|
void |
putContext(Class key,
Object contextObject)
Associates a context object with this
ELContext . |
addEvaluationListener, convertToType, enterLambdaScope, exitLambdaScope, getEvaluationListeners, getImportHandler, getLambdaArgument, getLocale, isLambdaArgument, isPropertyResolved, notifyAfterEvaluation, notifyBeforeEvaluation, notifyPropertyResolved, setLocale, setPropertyResolved, setPropertyResolved
public StandardELContext(ExpressionFactory factory)
factory
- The ExpressionFactorypublic StandardELContext(ELContext context)
context
- The ELContext that acts as a delegate in most casespublic void putContext(Class key, Object contextObject)
ELContext
ELContext
.
The ELContext
maintains a collection of context objects
relevant to the evaluation of an expression. These context objects
are used by ELResolver
s. This method is used to
add a context object to that collection.
By convention, the contextObject
will be of the
type specified by the key
. However, this is not
required and the key is used strictly as a unique identifier.
putContext
in class ELContext
key
- The key used by an @{link ELResolver} to identify this
context object.contextObject
- The context object to add to the collection.public Object getContext(Class key)
ELContext
The ELContext
maintains a collection of context objects
relevant to the evaluation of an expression. These context objects
are used by ELResolver
s. 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.
getContext
in class ELContext
key
- The unique identifier that was used to associate the
context object with this ELContext
.public ELResolver getELResolver()
Retrieves the ELResolver
associated with this context.
This is a CompositeELResover
consists of an ordered list of
ELResolver
s.
BeanNameELResolver
for beans defined locallyELResolver
sELResolver
supporting the collection operationsStaticFieldELResolver
for resolving static fieldsMapELResolver
for resolving Map propertiesResourceBundleELResolver
for resolving ResourceBundle propertiesListELResolver
for resolving List propertiesArrayELResolver
for resolving array propertiesBeanELResolver
for resolving bean propertiesgetELResolver
in class ELContext
public void addELResolver(ELResolver cELResolver)
cELResolver
- The new ELResolver to be added to the contextpublic FunctionMapper getFunctionMapper()
getFunctionMapper
in class ELContext
public VariableMapper getVariableMapper()
getVariableMapper
in class ELContext
Copyright © 1996-2013, Oracle and/or its affiliates. All Rights Reserved. Use is subject to license terms.