Class ExpressionFactoryImpl
java.lang.Object
jakarta.el.ExpressionFactory
org.apache.el.ExpressionFactoryImpl
Implementation of
ExpressionFactory.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription<T> TcoerceToType(Object obj, Class<T> type) Coerce the supplied object to the requested type.createMethodExpression(ELContext context, String expression, Class<?> expectedReturnType, Class<?>[] expectedParamTypes) Create a new method expression instance.createValueExpression(ELContext context, String expression, Class<?> expectedType) Create a new value expression.createValueExpression(Object instance, Class<?> expectedType) Creates aValueExpressionthat, when evaluated, returns the given instance of the specified type.Returns anELResolvercapable of resolving properties onInputStreamobjects, enabling EL expressions to operate on stream types.Methods inherited from class ExpressionFactory
getInitFunctionMap, newInstance, newInstance
-
Constructor Details
-
ExpressionFactoryImpl
public ExpressionFactoryImpl()Creates a new ExpressionFactoryImpl instance.
-
-
Method Details
-
coerceToType
Description copied from class:jakarta.el.ExpressionFactoryCoerce the supplied object to the requested type.- Specified by:
coerceToTypein classExpressionFactory- Type Parameters:
T- The type to which the object should be coerced- Parameters:
obj- The object to be coercedtype- The type to which the object should be coerced- Returns:
- An instance of the requested type.
-
createMethodExpression
public MethodExpression createMethodExpression(ELContext context, String expression, Class<?> expectedReturnType, Class<?>[] expectedParamTypes) Description copied from class:jakarta.el.ExpressionFactoryCreate a new method expression instance.- Specified by:
createMethodExpressionin classExpressionFactory- Parameters:
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 parameters- Returns:
- A new method expression formed from the input parameters.
-
createValueExpression
public ValueExpression createValueExpression(ELContext context, String expression, Class<?> expectedType) Description copied from class:jakarta.el.ExpressionFactoryCreate a new value expression.- Specified by:
createValueExpressionin classExpressionFactory- Parameters:
context- The EL context for this evaluationexpression- The String representation of the value expressionexpectedType- The expected type of the result of evaluating the expression- Returns:
- A new value expression formed from the input parameters
-
createValueExpression
Description copied from class:jakarta.el.ExpressionFactoryCreates aValueExpressionthat, when evaluated, returns the given instance of the specified type. This is a convenience method for creating a constant value expression without requiring anELContext.- Specified by:
createValueExpressionin classExpressionFactory- Parameters:
instance- the constant value to wrapexpectedType- the expected type of the value- Returns:
- a ValueExpression that returns the given instance when evaluated
-
getStreamELResolver
Description copied from class:jakarta.el.ExpressionFactoryReturns anELResolvercapable of resolving properties onInputStreamobjects, enabling EL expressions to operate on stream types. This allows expressions to read data from input streams using standard property navigation syntax.- Overrides:
getStreamELResolverin classExpressionFactory- Returns:
- the StreamELResolver, or
nullif not supported by this implementation
-