public abstract class ExpressionFactory
extends java.lang.Object
Constructor and Description |
---|
ExpressionFactory() |
Modifier and Type | Method and Description |
---|---|
abstract java.lang.Object |
coerceToType(java.lang.Object obj,
java.lang.Class<?> expectedType)
Coerce the supplied object to the requested type.
|
abstract MethodExpression |
createMethodExpression(ELContext context,
java.lang.String expression,
java.lang.Class<?> expectedReturnType,
java.lang.Class<?>[] expectedParamTypes)
Create a new method expression instance.
|
abstract ValueExpression |
createValueExpression(ELContext context,
java.lang.String expression,
java.lang.Class<?> expectedType)
Create a new value expression.
|
abstract ValueExpression |
createValueExpression(java.lang.Object instance,
java.lang.Class<?> expectedType) |
static ExpressionFactory |
newInstance()
Create a new
ExpressionFactory . |
static ExpressionFactory |
newInstance(java.util.Properties properties)
Create a new
ExpressionFactory passing in the provided
Properties . |
public abstract java.lang.Object coerceToType(java.lang.Object obj, java.lang.Class<?> expectedType) throws ELException
obj
- The object to be coercedexpectedType
- The type to which the object should be coercedELException
- If the conversion failspublic abstract ValueExpression createValueExpression(ELContext context, java.lang.String expression, java.lang.Class<?> expectedType) throws java.lang.NullPointerException, ELException
context
- The EL context for this evaluationexpression
- The String representation of the value expressionexpectedType
- The expected type of the result of evaluating the
expressionjava.lang.NullPointerException
- If the expected type is null
ELException
- If there are syntax errors in the provided expressionpublic abstract ValueExpression createValueExpression(java.lang.Object instance, java.lang.Class<?> expectedType)
public abstract MethodExpression createMethodExpression(ELContext context, java.lang.String expression, java.lang.Class<?> expectedReturnType, java.lang.Class<?>[] expectedParamTypes) throws ELException, java.lang.NullPointerException
context
- The EL context for this evaluationexpression
- The String representation of the method
expressionexpectedReturnType
- The expected type of the result of invoking the
methodexpectedParamTypes
- The expected types of the input parametersjava.lang.NullPointerException
- If the expected parameters types are null
ELException
- If there are syntax errors in the provided expressionpublic static ExpressionFactory newInstance()
ExpressionFactory
. The class to use is determined by
the following search order:
public static ExpressionFactory newInstance(java.util.Properties properties)
ExpressionFactory
passing in the provided
Properties
. Search order is the same as newInstance()
.properties
- the properties to be passed to the new instance (may be null)Copyright © 2000-2015 Apache Software Foundation. All Rights Reserved.