Class StandardELContext
- Since:
- Jakarta Expression Language 3.0
- 
Constructor SummaryConstructorsConstructorDescriptionStandardELContext(ELContext context) Construct a StandardELContext from another ELContext.StandardELContext(ExpressionFactory factory) Construct a default ELContext for a stand-alone environment.
- 
Method SummaryModifier and TypeMethodDescriptionvoidaddELResolver(ELResolver cELResolver) Add a custom ELResolver to the context.getContext(Class<?> key) Returns the context object associated with the given key.Construct (if needed) and return a default ELResolver.Construct (if needed) and return a default FunctionMapper.Construct (if needed) and return a default VariableMapper() {voidputContext(Class<?> key, Object contextObject) Associates a context object with thisELContext.Methods inherited from class jakarta.el.ELContextaddEvaluationListener, convertToType, enterLambdaScope, exitLambdaScope, getEvaluationListeners, getImportHandler, getLambdaArgument, getLocale, isLambdaArgument, isPropertyResolved, notifyAfterEvaluation, notifyBeforeEvaluation, notifyPropertyResolved, setLocale, setPropertyResolved, setPropertyResolved
- 
Constructor Details- 
StandardELContextConstruct a default ELContext for a stand-alone environment.- Parameters:
- factory- The ExpressionFactory
 
- 
StandardELContextConstruct a StandardELContext from another ELContext.- Parameters:
- context- The ELContext that acts as a delegate in most cases
 
 
- 
- 
Method Details- 
putContextDescription 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 class- ELContext
- Parameters:
- key- The key used by an @{link ELResolver} to identify this context object.
- contextObject- The context object to add to the collection.
 
- 
getContextDescription 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 class- ELContext
- Parameters:
- key- The unique identifier that was used to associate the context object with this- ELContext.
- Returns:
- The context object associated with the given key, or null if no such context was found.
 
- 
getELResolverConstruct (if needed) and return a default ELResolver.Retrieves the ELResolverassociated with this context. This is aCompositeELResoverconsists of an ordered list ofELResolvers.- A BeanNameELResolverfor beans defined locally
- Any custom ELResolvers
- An ELResolversupporting the collection operations
- A StaticFieldELResolverfor resolving static fields
- A MapELResolverfor resolving Map properties
- A ResourceBundleELResolverfor resolving ResourceBundle properties
- A ListELResolverfor resolving List properties
- An ArrayELResolverfor resolving array properties
- A RecordELResolverfor resolving Record properties
- A BeanELResolverfor resolving bean properties
 - Specified by:
- getELResolverin class- ELContext
- Returns:
- The ELResolver for this context.
 
- A 
- 
addELResolverAdd a custom ELResolver to the context. The list of the custom ELResolvers will be accessed in the order they are added. A custom ELResolver added to the context cannot be removed.- Parameters:
- cELResolver- The new ELResolver to be added to the context
 
- 
getFunctionMapperConstruct (if needed) and return a default FunctionMapper.- Specified by:
- getFunctionMapperin class- ELContext
- Returns:
- The default FunctionMapper
 
- 
getVariableMapperConstruct (if needed) and return a default VariableMapper() {- Specified by:
- getVariableMapperin class- ELContext
- Returns:
- The default Variable
 
 
-