Class CompiledELContext
java.lang.Object
jakarta.el.ELContext
io.micronaut.el.CompiledELContext
public class CompiledELContext
extends jakarta.el.ELContext
A standalone
ELContext backed by the resolvers generated at compilation time.
The functions of the compiled expressions are bound at compilation time, therefore the function mapper of this context resolves nothing.
- Since:
- 1.0
- Author:
- Denis Stepanov
-
Constructor Summary
ConstructorsConstructorDescriptionCreates a context using the standard chain of resolvers.CompiledELContext(jakarta.el.ELResolver... first) -
Method Summary
Modifier and TypeMethodDescriptionvoidaddEvaluationListener(jakarta.el.EvaluationListener listener) voidenterLambdaScope(Map<String, Object> args) void@Nullable Objectjakarta.el.ELResolverjakarta.el.FunctionMapperjakarta.el.VariableMapperbooleanisLambdaArgument(String arg) voidnotifyAfterEvaluation(String expression) voidnotifyBeforeEvaluation(String expression) voidnotifyPropertyResolved(@Nullable Object base, @Nullable Object property) @Nullable ObjectresolveBean(String name) Resolves a declared variable the wayELResolution.resolveVariabledoes, from the beans of this context directly when nothing can shadow them: no lambda scope is open and the variable mapper holds no variable.Defines a bean resolvable by its name.Methods inherited from class jakarta.el.ELContext
convertToType, getContext, getEvaluationListeners, getImportHandler, getLambdaArgument, getLocale, isPropertyResolved, putContext, setLocale, setPropertyResolved, setPropertyResolved
-
Constructor Details
-
CompiledELContext
public CompiledELContext()Creates a context using the standard chain of resolvers. -
CompiledELContext
public CompiledELContext(jakarta.el.ELResolver... first) - Parameters:
first- The resolvers consulted before the standard ones
-
-
Method Details
-
resolveBean
Resolves a declared variable the wayELResolution.resolveVariabledoes, from the beans of this context directly when nothing can shadow them: no lambda scope is open and the variable mapper holds no variable.- Parameters:
name- The name of the variable- Returns:
- The bean, or
nullwhen the name is not a bean of this context or may be shadowed, in which case the resolution goes through the mapper and the resolvers
-
isLambdaArgument
- Overrides:
isLambdaArgumentin classjakarta.el.ELContext
-
addEvaluationListener
public void addEvaluationListener(jakarta.el.EvaluationListener listener) - Overrides:
addEvaluationListenerin classjakarta.el.ELContext
-
notifyBeforeEvaluation
- Overrides:
notifyBeforeEvaluationin classjakarta.el.ELContext
-
notifyAfterEvaluation
- Overrides:
notifyAfterEvaluationin classjakarta.el.ELContext
-
notifyPropertyResolved
-
enterLambdaScope
-
exitLambdaScope
public void exitLambdaScope()- Overrides:
exitLambdaScopein classjakarta.el.ELContext
-
setBean
Defines a bean resolvable by its name.- Parameters:
name- The namevalue- The value- Returns:
- This context
-
getBean
-
getELResolver
public jakarta.el.ELResolver getELResolver()- Specified by:
getELResolverin classjakarta.el.ELContext
-
getFunctionMapper
public jakarta.el.FunctionMapper getFunctionMapper()- Specified by:
getFunctionMapperin classjakarta.el.ELContext
-
getVariableMapper
public jakarta.el.VariableMapper getVariableMapper()- Specified by:
getVariableMapperin classjakarta.el.ELContext
-