org.apache.camel.util
Class ExpressionHelper
java.lang.Object
org.apache.camel.util.ExpressionHelper
public class ExpressionHelper
- extends Object
A collection of helper methods for working with expressions.
- Version:
- $Revision: 1.1 $
Method Summary |
static
|
evaluateAsString(Expression<E> expression,
E exchange)
Evaluates the given expression on the exchange as a String value |
static
|
evaluateAsType(Expression<E> expression,
E exchange,
Class<T> resultType)
Evaluates the given expression on the exchange, converting the result to the given type |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ExpressionHelper
public ExpressionHelper()
evaluateAsString
public static <E extends Exchange> String evaluateAsString(Expression<E> expression,
E exchange)
- Evaluates the given expression on the exchange as a String value
- Parameters:
expression
- the expression to evaluateexchange
- the exchange to use to evaluate the expression
- Returns:
- the result of the evaluation as a string.
evaluateAsType
public static <T,E extends Exchange> T evaluateAsType(Expression<E> expression,
E exchange,
Class<T> resultType)
- Evaluates the given expression on the exchange, converting the result to the given type
- Parameters:
expression
- the expression to evaluateexchange
- the exchange to use to evaluate the expressionresultType
- the type of the result that is required
- Returns:
- the result of the evaluation as the specified type.
Copyright © 2007 Apache Software Foundation. All Rights Reserved.