Class ExpressionAdapter

  extended by
      extended by
All Implemented Interfaces:
Expression, Predicate
Direct Known Subclasses:
DirectVmConsumerExpression, 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.


Constructor Summary
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
assertMatches, evaluate, matches
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail


public ExpressionAdapter()
Method Detail


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


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

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

Apache Camel