Package org.camunda.bpm.impl.juel
Class ExpressionFactoryImpl
java.lang.Object
jakarta.el.ExpressionFactory
org.camunda.bpm.impl.juel.ExpressionFactoryImpl
public class ExpressionFactoryImpl
extends jakarta.el.ExpressionFactory
Expression factory implementation.
This class is also used as an EL "service provider". The JUEL jar file specifies this
class as el expression factory implementation in
META-INF/services/jakarta.el.ExpressionFactory. Calling
ExpressionFactory.newInstance() will then return an instance of this class, configured as
described below.
If no properties are specified at construction time, properties are read from
-
If the file
JAVA_HOME/lib/el.propertiesexists and if it contains propertyjakarta.el.ExpressionFactorywhose value is the name of this class, these properties are taken as default properties. - Otherwise, if system property
jakarta.el.ExpressionFactoryis set to the name of this class, the system propertiesSystem.getProperties()are taken as default properties. -
el.propertieson your classpath. These properties override the properties fromJAVA_HOME/lib/el.propertiesorSystem.getProperties().
Properties.
Having this, the following properties are read:
-
jakarta.el.cacheSize- cache size (int, default is 1000) -
jakarta.el.methodInvocations- allow method invocations as in${foo.bar(baz)}(boolean, default isfalse). -
jakarta.el.nullProperties- resolvenullproperties as in${foo[null]}(boolean, default isfalse). -
jakarta.el.varArgs- support function/method calls using varargs (boolean, default isfalse).
- Author:
- Christoph Beck
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enumA profile provides a default set of language features that will define the builder's behavior. -
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionCreate a new expression factory using the default builder and cache implementations.ExpressionFactoryImpl(Properties properties) Create a new expression factory using the default builder and cache implementations.ExpressionFactoryImpl(Properties properties, TypeConverter converter) Create a new expression factory using the default builder and cache implementations.Create a new expression factory using the default builder and cache implementations.ExpressionFactoryImpl(ExpressionFactoryImpl.Profile profile, Properties properties) Create a new expression factory using the default builder and cache implementations.ExpressionFactoryImpl(ExpressionFactoryImpl.Profile profile, Properties properties, TypeConverter converter) Create a new expression factory using the default builder and cache implementations.ExpressionFactoryImpl(TreeStore store) Create a new expression factory.ExpressionFactoryImpl(TreeStore store, TypeConverter converter) Create a new expression factory. -
Method Summary
Modifier and TypeMethodDescriptioncoerceToType(Object obj, Class<?> targetType) final TreeMethodExpressioncreateMethodExpression(jakarta.el.ELContext context, String expression, Class<?> expectedReturnType, Class<?>[] expectedParamTypes) protected TreeBuildercreateTreeBuilder(Properties properties, Builder.Feature... features) Create the factory's builder.protected TreeStorecreateTreeStore(int defaultCacheSize, ExpressionFactoryImpl.Profile profile, Properties properties) Create the factory's tree store.protected TypeConvertercreateTypeConverter(Properties properties) Create the factory's type converter.final TreeValueExpressioncreateValueExpression(jakarta.el.ELContext context, String expression, Class<?> expectedType) final ObjectValueExpressioncreateValueExpression(Object instance, Class<?> expectedType) Methods inherited from class jakarta.el.ExpressionFactory
coerceToType, getInitFunctionMap, getStreamELResolver, newInstance, newInstance
-
Field Details
-
PROP_METHOD_INVOCATIONS
jakarta.el.methodInvocations- See Also:
-
PROP_VAR_ARGS
jakarta.el.varArgs- See Also:
-
PROP_NULL_PROPERTIES
jakarta.el.nullProperties- See Also:
-
PROP_CACHE_SIZE
jakarta.el.cacheSize- See Also:
-
-
Constructor Details
-
ExpressionFactoryImpl
public ExpressionFactoryImpl()Create a new expression factory using the default builder and cache implementations. The builder and cache are configured fromel.properties(see above). The maximum cache size will be 1000 unless overridden inel.properties. The builder profile isExpressionFactoryImpl.Profile.JEE6(features may be overridden inel.properties). -
ExpressionFactoryImpl
Create a new expression factory using the default builder and cache implementations. The builder and cache are configured from the specified profile andel.properties(see above). The maximum cache size will be 1000 unless overridden inel.properties.- Parameters:
profile- builder profile (features may be overridden inel.properties)- Since:
- 2.2
-
ExpressionFactoryImpl
Create a new expression factory using the default builder and cache implementations. The builder and cache are configured using the specified properties. The maximum cache size will be 1000 unless overridden by propertyjakarta.el.cacheSize. The builder profile isExpressionFactoryImpl.Profile.JEE6(features may be overridden inproperties).- Parameters:
properties- used to initialize this factory (may benull)
-
ExpressionFactoryImpl
Create a new expression factory using the default builder and cache implementations. The builder and cache are configured using the specified profile and properties. The maximum cache size will be 1000 unless overridden by propertyjakarta.el.cacheSize.- Parameters:
profile- builder profile (individual features may be overridden in properties)properties- used to initialize this factory (may benull)- Since:
- 2.2
-
ExpressionFactoryImpl
Create a new expression factory using the default builder and cache implementations. The builder and cache are configured using the specified properties. The maximum cache size will be 1000 unless overridden by propertyjakarta.el.cacheSize. The builder profile isExpressionFactoryImpl.Profile.JEE6(individual features may be overridden inproperties).- Parameters:
properties- used to initialize this factory (may benull)converter- custom type converter
-
ExpressionFactoryImpl
public ExpressionFactoryImpl(ExpressionFactoryImpl.Profile profile, Properties properties, TypeConverter converter) Create a new expression factory using the default builder and cache implementations. The builder and cache are configured using the specified profile and properties. The maximum cache size will be 1000 unless overridden by propertyjakarta.el.cacheSize.- Parameters:
profile- builder profile (individual features may be overridden in properties)properties- used to initialize this factory (may benull)converter- custom type converter- Since:
- 2.2
-
ExpressionFactoryImpl
Create a new expression factory.- Parameters:
store- the tree store used to parse and cache parse trees.
-
ExpressionFactoryImpl
Create a new expression factory.- Parameters:
store- the tree store used to parse and cache parse trees.converter- custom type converter
-
-
Method Details
-
createTreeStore
protected TreeStore createTreeStore(int defaultCacheSize, ExpressionFactoryImpl.Profile profile, Properties properties) Create the factory's tree store. This implementation creates a new tree store using the default builder and cache implementations. The builder and cache are configured using the specified properties. The maximum cache size will be as specified unless overridden by propertyjakarta.el.cacheSize. -
createTypeConverter
Create the factory's type converter. This implementation takes thede.odysseus.el.misc.TypeConverterproperty as the name of a class implementing thede.odysseus.el.misc.TypeConverterinterface. If the property is not set, the default converter (TypeConverter.DEFAULT) is used. -
createTreeBuilder
Create the factory's builder. This implementation takes thede.odysseus.el.tree.TreeBuilderproperty as a name of a class implementing thede.odysseus.el.tree.TreeBuilderinterface. If the property is not set, a plainde.odysseus.el.tree.impl.Builderis used. If the configured class is a subclass ofde.odysseus.el.tree.impl.Builderand which provides a constructor taking an array ofBuilder.Feature, this constructor will be invoked. Otherwise, the default constructor will be used. -
coerceToType
-
createValueExpression
- Specified by:
createValueExpressionin classjakarta.el.ExpressionFactory
-
createValueExpression
public final TreeValueExpression createValueExpression(jakarta.el.ELContext context, String expression, Class<?> expectedType) - Specified by:
createValueExpressionin classjakarta.el.ExpressionFactory
-
createMethodExpression
public final TreeMethodExpression createMethodExpression(jakarta.el.ELContext context, String expression, Class<?> expectedReturnType, Class<?>[] expectedParamTypes) - Specified by:
createMethodExpressionin classjakarta.el.ExpressionFactory
-