Spring Web Flow

org.springframework.binding.expression.el
Class ELExpressionParser

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

public class ELExpressionParser
extends java.lang.Object
implements ExpressionParser

The expression parser that parses EL expressions.

Author:
Keith Donald, Jeremy Grelle

Constructor Summary
ELExpressionParser(javax.el.ExpressionFactory expressionFactory)
          Creates a new EL expression parser for standalone usage.
 
Method Summary
 ConversionService getConversionService()
          The conversion service to use to perform type conversions as needed by the Unified EL system.
 Expression parseExpression(java.lang.String expressionString, ParserContext context)
          Parse the expression string and return a compiled Expression object you can use for evaluation.
 void putContextFactory(java.lang.Class<?> contextType, ELContextFactory contextFactory)
          Register the ELContextFactory for expressions that evaluate the given class of context object.
 void setConversionService(ConversionService conversionService)
          Sets the conversion service to use to perform type conversions as needed by the Unified EL system.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ELExpressionParser

public ELExpressionParser(javax.el.ExpressionFactory expressionFactory)
Creates a new EL expression parser for standalone usage.

Method Detail

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(java.lang.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(java.lang.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

Spring Web Flow