Class CompiledExpressionFactory
java.lang.Object
jakarta.el.ExpressionFactory
io.micronaut.el.CompiledExpressionFactory
public class CompiledExpressionFactory
extends jakarta.el.ExpressionFactory
The
ExpressionFactory returning the expressions compiled at compilation time.
The factory does not parse expressions at runtime. An expression that was not compiled, and that is not a literal-expression, cannot be created.
- Since:
- 1.0
- Author:
- Denis Stepanov
-
Constructor Summary
ConstructorsConstructorDescriptionCreates a factory loading the generated expression sources with theSoftServiceLoader.CompiledExpressionFactory(ClassLoader classLoader) Creates a factory loading the generated expression sources from the given class loader.CompiledExpressionFactory(List<ELExpressionSource> sources) CompiledExpressionFactory(List<ELExpressionSource> sources, @Nullable ELExpressionParser parser) -
Method Summary
Modifier and TypeMethodDescription<T> @Nullable TcoerceToType(@Nullable Object obj, @Nullable Class<T> targetType) jakarta.el.MethodExpressioncreateMethodExpression(jakarta.el.ELContext context, String expression, Class<?> expectedReturnType, Class<?>[] expectedParamTypes) jakarta.el.ValueExpressioncreateValueExpression(jakarta.el.ELContext context, String expression, Class<?> expectedType) jakarta.el.ValueExpressioncreateValueExpression(Object instance, Class<?> expectedType) jakarta.el.ELResolverMethods inherited from class jakarta.el.ExpressionFactory
newInstance, newInstance
-
Constructor Details
-
CompiledExpressionFactory
public CompiledExpressionFactory()Creates a factory loading the generated expression sources with theSoftServiceLoader.The sources are loaded with the context class loader of the thread, which is the loader
ExpressionFactory.newInstance()locates this factory with, so that the expressions generated into a class loader that is a child of the one holding this class — a deployment, a plugin, an isolated test — are found. The loader of this class is used when the thread has none. -
CompiledExpressionFactory
Creates a factory loading the generated expression sources from the given class loader.- Parameters:
classLoader- The class loader holding the generated sources and the optional parser
-
CompiledExpressionFactory
- Parameters:
sources- The expression sources
-
CompiledExpressionFactory
public CompiledExpressionFactory(List<ELExpressionSource> sources, @Nullable ELExpressionParser parser) - Parameters:
sources- The expression sourcesparser- The parser creating the expressions that were not compiled, can benull
-
-
Method Details
-
createValueExpression
-
createValueExpression
-
createMethodExpression
-
coerceToType
-
getStreamELResolver
public jakarta.el.ELResolver getStreamELResolver()- Overrides:
getStreamELResolverin classjakarta.el.ExpressionFactory
-
getInitFunctionMap
-