public class ExpressionFactoryImpl extends ExpressionFactory
META-INF/services/javax.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
JAVA_HOME/lib/el.properties exists and if it contains property
javax.el.ExpressionFactory whose value is the name of this class, these properties
are taken as default properties.javax.el.ExpressionFactory is set to the name of
this class, the system properties System.getProperties() are taken as default properties.
el.properties on your classpath. These properties override the properties from
JAVA_HOME/lib/el.properties or System.getProperties().Properties.
Having this, the following properties are read:
javax.el.cacheSize - cache size (int, default is 1000)javax.el.methodInvocations - allow method invocations as in
${foo.bar(baz)} (boolean, default is false).javax.el.nullProperties - resolve null properties as in
${foo[null]} (boolean, default is false).javax.el.varArgs - support function/method calls using varargs (boolean, default is
false).| Modifier and Type | Class and Description |
|---|---|
static class |
ExpressionFactoryImpl.Profile
A profile provides a default set of language features that will define the builder's
behavior.
|
| Modifier and Type | Field and Description |
|---|---|
static String |
PROP_CACHE_SIZE
javax.el.cacheSize |
static String |
PROP_IGNORE_RETURN_TYPE
javax.el.ignoreReturnType |
static String |
PROP_METHOD_INVOCATIONS
javax.el.methodInvocations |
static String |
PROP_NULL_PROPERTIES
javax.el.nullProperties |
static String |
PROP_VAR_ARGS
javax.el.varArgs |
| Constructor and Description |
|---|
ExpressionFactoryImpl()
Create a new expression factory using the default builder and cache implementations.
|
ExpressionFactoryImpl(ExpressionFactoryImpl.Profile profile)
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(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.
|
ExpressionFactoryImpl(TreeStore store)
Create a new expression factory.
|
ExpressionFactoryImpl(TreeStore store,
TypeConverter converter)
Create a new expression factory.
|
| Modifier and Type | Method and Description |
|---|---|
Object |
coerceToType(Object obj,
Class<?> targetType) |
TreeMethodExpression |
createMethodExpression(ELContext context,
String expression,
Class<?> expectedReturnType,
Class<?>[] expectedParamTypes) |
protected TreeBuilder |
createTreeBuilder(Properties properties,
Builder.Feature... features)
Create the factory's builder.
|
protected TreeStore |
createTreeStore(int defaultCacheSize,
ExpressionFactoryImpl.Profile profile,
Properties properties)
Create the factory's tree store.
|
protected TypeConverter |
createTypeConverter(Properties properties)
Create the factory's type converter.
|
TreeValueExpression |
createValueExpression(ELContext context,
String expression,
Class<?> expectedType) |
ObjectValueExpression |
createValueExpression(Object instance,
Class<?> expectedType) |
newInstance, newInstancepublic static final String PROP_METHOD_INVOCATIONS
javax.el.methodInvocationspublic static final String PROP_VAR_ARGS
javax.el.varArgspublic static final String PROP_NULL_PROPERTIES
javax.el.nullPropertiespublic static final String PROP_IGNORE_RETURN_TYPE
javax.el.ignoreReturnTypepublic static final String PROP_CACHE_SIZE
javax.el.cacheSizepublic ExpressionFactoryImpl()
el.properties (see above). The maximum
cache size will be 1000 unless overridden in el.properties. The builder profile
is ExpressionFactoryImpl.Profile.JEE6 (features may be overridden in el.properties).public ExpressionFactoryImpl(ExpressionFactoryImpl.Profile profile)
el.properties
(see above). The maximum cache size will be 1000 unless overridden in
el.properties.profile - builder profile (features may be overridden in el.properties)public ExpressionFactoryImpl(Properties properties)
javax.el.cacheSize. The builder profile is
ExpressionFactoryImpl.Profile.JEE6 (features may be overridden in properties).properties - used to initialize this factory (may be null)public ExpressionFactoryImpl(ExpressionFactoryImpl.Profile profile, Properties properties)
javax.el.cacheSize.profile - builder profile (individual features may be overridden in properties)properties - used to initialize this factory (may be null)public ExpressionFactoryImpl(Properties properties, TypeConverter converter)
javax.el.cacheSize. The builder profile is
ExpressionFactoryImpl.Profile.JEE6 (individual features may be overridden in properties).properties - used to initialize this factory (may be null)converter - custom type converterpublic ExpressionFactoryImpl(ExpressionFactoryImpl.Profile profile, Properties properties, TypeConverter converter)
javax.el.cacheSize.profile - builder profile (individual features may be overridden in properties)properties - used to initialize this factory (may be null)converter - custom type converterpublic ExpressionFactoryImpl(TreeStore store)
store - the tree store used to parse and cache parse trees.public ExpressionFactoryImpl(TreeStore store, TypeConverter converter)
store - the tree store used to parse and cache parse trees.converter - custom type converterprotected TreeStore createTreeStore(int defaultCacheSize, ExpressionFactoryImpl.Profile profile, Properties properties)
javax.el.cacheSize.protected TypeConverter createTypeConverter(Properties properties)
de.odysseus.el.misc.TypeConverter property as the name of a class implementing
the de.odysseus.el.misc.TypeConverter interface. If the property is not set, the
default converter (TypeConverter.DEFAULT) is used.protected TreeBuilder createTreeBuilder(Properties properties, Builder.Feature... features)
de.odysseus.el.tree.TreeBuilder property as a name of a class implementing the
de.odysseus.el.tree.TreeBuilder interface. If the property is not set, a plain
de.odysseus.el.tree.impl.Builder is used. If the configured class is a subclass
of de.odysseus.el.tree.impl.Builder and which provides a constructor taking an
array of Builder.Feature, this constructor will be invoked. Otherwise, the
default constructor will be used.public final Object coerceToType(Object obj, Class<?> targetType)
coerceToType in class ExpressionFactorypublic final ObjectValueExpression createValueExpression(Object instance, Class<?> expectedType)
createValueExpression in class ExpressionFactorypublic final TreeValueExpression createValueExpression(ELContext context, String expression, Class<?> expectedType)
createValueExpression in class ExpressionFactorypublic final TreeMethodExpression createMethodExpression(ELContext context, String expression, Class<?> expectedReturnType, Class<?>[] expectedParamTypes)
createMethodExpression in class ExpressionFactoryCopyright © 2006-2014 Odysseus Software GmbH. All Rights Reserved.