Class ELExpressionParser

java.lang.Object
org.springframework.binding.expression.el.ELExpressionParser
All Implemented Interfaces:
ExpressionParser
Direct Known Subclasses:
JsfManagedBeanAwareELExpressionParser, WebFlowELExpressionParser

public class ELExpressionParser extends Object implements ExpressionParser
The expression parser that parses EL expressions.
Author:
Keith Donald, Jeremy Grelle
  • Constructor Details

    • ELExpressionParser

      public ELExpressionParser(jakarta.el.ExpressionFactory expressionFactory)
      Creates a new EL expression parser for standalone usage.
  • Method Details

    • getConversionService

      public ConversionService getConversionService()
      The conversion service to use to perform type conversions as needed by the Unified EL system. If not specified, the default is an instance of DefaultConversionService.
    • setConversionService

      public void setConversionService(ConversionService conversionService)
      Sets the conversion service to use to perform type conversions as needed by the Unified EL system.
      Parameters:
      conversionService - the conversion service to use
    • putContextFactory

      public void putContextFactory(Class<?> contextType, ELContextFactory contextFactory)
      Register the ELContextFactory for expressions that evaluate the given class of context object.
      Parameters:
      contextType - the expression context class
      contextFactory - the context factory to use for expressions that evaluate those types of contexts
    • parseExpression

      public Expression parseExpression(String expressionString, ParserContext context) throws ParserException
      Description copied from interface: ExpressionParser
      Parse the expression string and return a compiled Expression object you can use for evaluation. Some examples:
           3 + 4
           name.firstName
       
      Specified by:
      parseExpression in interface ExpressionParser
      Parameters:
      expressionString - the raw expression string to parse
      context - a context for influencing this expression parsing routine (optional)
      Returns:
      an evaluator for the parsed expression
      Throws:
      ParserException - an exception occurred during parsing