ExpressionFactoryImpl (Apache Tomcat 10.1.55 API Documentation)
Description: declaration: package: org.apache.el, class: ExpressionFactoryImpl

# Class ExpressionFactoryImpl

java.lang.Object
jakarta.el.ExpressionFactory
org.apache.el.ExpressionFactoryImpl

public class ExpressionFactoryImpl extends ExpressionFactory
Implementation of `ExpressionFactory`.

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `ExpressionFactoryImpl()`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `<T> T`
  `coerceToType(Object obj, Class<T> type)`
  Coerce the supplied object to the requested type.
  `MethodExpression`
  `createMethodExpression(ELContext context, String expression, Class<?> expectedReturnType, Class<?>[] expectedParamTypes)`
  Create a new method expression instance.
  `ValueExpression`
  `createValueExpression(ELContext context, String expression, Class<?> expectedType)`
  Create a new value expression.
  `ValueExpression`
  `createValueExpression(Object instance, Class<?> expectedType)`
  `ELResolver`
  `getStreamELResolver()`

  ### Methods inherited from class ExpressionFactory

  `getInitFunctionMap, newInstance, newInstance`

  ### Methods inherited from class Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## Constructor Details

  - ### ExpressionFactoryImpl

    public ExpressionFactoryImpl()

- ## Method Details

  - ### coerceToType

    public <T> T coerceToType(Object obj, Class<T> type)
    Description copied from class: `jakarta.el.ExpressionFactory`
    Coerce the supplied object to the requested type.
    Specified by:
      `coerceToType` in class `ExpressionFactory`
    Type Parameters:
      `T` - The type to which the object should be coerced
    Parameters:
      `obj` - The object to be coerced
      `type` - 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.ExpressionFactory`
    Create a new method expression instance.
    Specified by:
      `createMethodExpression` in class `ExpressionFactory`
    Parameters:
      `context` - The EL context for this evaluation
      `expression` - The String representation of the method expression
      `expectedReturnType` - The expected type of the result of invoking the method
      `expectedParamTypes` - 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.ExpressionFactory`
    Create a new value expression.
    Specified by:
      `createValueExpression` in class `ExpressionFactory`
    Parameters:
      `context` - The EL context for this evaluation
      `expression` - The String representation of the value expression
      `expectedType` - The expected type of the result of evaluating the expression
    Returns:
      A new value expression formed from the input parameters

  - ### createValueExpression

    public ValueExpression createValueExpression(Object instance, Class<?> expectedType)
    Specified by:
      `createValueExpression` in class `ExpressionFactory`

  - ### getStreamELResolver

    public ELResolver getStreamELResolver()
    Overrides:
      `getStreamELResolver` in class `ExpressionFactory`
    Returns:
      This default implementation returns null