org.springframework.yarn.support
Class AbstractExpressionEvaluator

java.lang.Object
  extended by org.springframework.yarn.support.AbstractExpressionEvaluator
All Implemented Interfaces:
Aware, BeanFactoryAware, InitializingBean
Direct Known Subclasses:
ContainerMethodInvokerHelper

public abstract class AbstractExpressionEvaluator
extends Object
implements BeanFactoryAware, InitializingBean

Base class providing common functionality for using Spring expression language.

Author:
Mark Fisher, Dave Syer, Oleg Zhurakousky, Artem Bilan, Gary Russell, Janne Valkealahti

Constructor Summary
AbstractExpressionEvaluator()
           
 
Method Summary
 void afterPropertiesSet()
           
protected  Object evaluateExpression(Expression expression)
           
protected
<T> T
evaluateExpression(Expression expression, Class<T> expectedType)
           
protected  Object evaluateExpression(Expression expression, Object input)
           
protected
<T> T
evaluateExpression(Expression expression, Object input, Class<T> expectedType)
           
protected  Object evaluateExpression(String expression, Object input)
           
protected
<T> T
evaluateExpression(String expression, Object input, Class<T> expectedType)
           
protected  StandardEvaluationContext getEvaluationContext()
          Gets the evaluation context.
protected  StandardEvaluationContext getEvaluationContext(boolean beanFactoryRequired)
          Emits a WARN log if the beanFactory field is null, unless the argument is false.
 void setBeanFactory(BeanFactory beanFactory)
           
 void setConversionService(ConversionService conversionService)
          Sets the conversion service.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AbstractExpressionEvaluator

public AbstractExpressionEvaluator()
Method Detail

setBeanFactory

public void setBeanFactory(BeanFactory beanFactory)
Specified by:
setBeanFactory in interface BeanFactoryAware

afterPropertiesSet

public void afterPropertiesSet()
                        throws Exception
Specified by:
afterPropertiesSet in interface InitializingBean
Throws:
Exception

setConversionService

public void setConversionService(ConversionService conversionService)
Sets the conversion service.

Parameters:
conversionService - the new conversion service

getEvaluationContext

protected StandardEvaluationContext getEvaluationContext()
Gets the evaluation context.

Returns:
the evaluation context

getEvaluationContext

protected final StandardEvaluationContext getEvaluationContext(boolean beanFactoryRequired)
Emits a WARN log if the beanFactory field is null, unless the argument is false.

Parameters:
beanFactoryRequired - set to false to suppress the warning.
Returns:
The evaluation context.

evaluateExpression

protected Object evaluateExpression(String expression,
                                    Object input)

evaluateExpression

protected <T> T evaluateExpression(String expression,
                                   Object input,
                                   Class<T> expectedType)

evaluateExpression

protected Object evaluateExpression(Expression expression,
                                    Object input)

evaluateExpression

protected <T> T evaluateExpression(Expression expression,
                                   Class<T> expectedType)

evaluateExpression

protected Object evaluateExpression(Expression expression)

evaluateExpression

protected <T> T evaluateExpression(Expression expression,
                                   Object input,
                                   Class<T> expectedType)