org.apache.camel.support
Class ExpressionAdapter

java.lang.Object
  extended by org.apache.camel.support.ExpressionSupport
      extended by org.apache.camel.support.ExpressionAdapter
All Implemented Interfaces:
Expression, Predicate
Direct Known Subclasses:
ExpressionAdapter, TokenPairExpressionIterator, TokenXMLExpressionIterator

public abstract class ExpressionAdapter
extends ExpressionSupport

A helper class for developers wishing to implement an Expression using Java code with a minimum amount of code to write so that the developer only needs to implement one of the evaluate(org.apache.camel.Exchange, Class) or ExpressionSupport.evaluate(org.apache.camel.Exchange) methods.

Version:

Constructor Summary
ExpressionAdapter()
           
 
Method Summary
protected  String assertionFailureMessage(Exchange exchange)
           
<T> T
evaluate(Exchange exchange, Class<T> type)
          Returns the value of the expression on the given exchange
 
Methods inherited from class org.apache.camel.support.ExpressionSupport
assertMatches, evaluate, matches
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ExpressionAdapter

public ExpressionAdapter()
Method Detail

assertionFailureMessage

protected String assertionFailureMessage(Exchange exchange)
Specified by:
assertionFailureMessage in class ExpressionSupport

evaluate

public <T> T evaluate(Exchange exchange,
                      Class<T> type)
Description copied from interface: Expression
Returns the value of the expression on the given exchange

Parameters:
exchange - the message exchange on which to evaluate the expression
type - the expected type of the evaluation result
Returns:
the value of the expression


Apache CAMEL