Interface ELExpressionParser

All Known Implementing Classes:
InterpretingELExpressionParser

public interface ELExpressionParser
Creates the expressions that were not compiled at compilation time.

The compiled expressions are the fast path: they are parsed, type checked and turned into Java source when the annotation processor runs. An implementation of this interface is only consulted for the expressions that are not known at compilation time, which is the case when an expression string is built at runtime. When no implementation is on the classpath such an expression cannot be created.

Since:
1.0
Author:
Denis Stepanov
See Also:
  • Method Summary

    Modifier and Type
    Method
    Description
    jakarta.el.MethodExpression
    createMethodExpression(@Nullable jakarta.el.ELContext context, String expression, Class<?> expectedReturnType, Class<?>[] expectedParamTypes)
    Parses a method expression.
    jakarta.el.ValueExpression
    createValueExpression(@Nullable jakarta.el.ELContext context, String expression, Class<?> expectedType)
    Parses a value expression.
  • Method Details

    • createValueExpression

      jakarta.el.ValueExpression createValueExpression(@Nullable jakarta.el.ELContext context, String expression, Class<?> expectedType)
      Parses a value expression.
      Parameters:
      context - The context the expression is created for, can be null
      expression - The expression
      expectedType - The expected type of the evaluation result
      Returns:
      The value expression
    • createMethodExpression

      jakarta.el.MethodExpression createMethodExpression(@Nullable jakarta.el.ELContext context, String expression, Class<?> expectedReturnType, Class<?>[] expectedParamTypes)
      Parses a method expression.
      Parameters:
      context - The context the expression is created for, can be null
      expression - The expression
      expectedReturnType - The expected return type
      expectedParamTypes - The expected parameter types
      Returns:
      The method expression