org.apache.camel.language.bean
Class BeanExpression
java.lang.Object
org.apache.camel.language.bean.BeanExpression
- All Implemented Interfaces:
- Expression, Predicate
public class BeanExpression
- extends Object
- implements Expression, Predicate
Evaluates an expression using a bean method invocation
BeanExpression
public BeanExpression(Object bean,
String method)
BeanExpression
public BeanExpression(String beanName,
String method)
BeanExpression
public BeanExpression(Class<?> type,
String method)
BeanExpression
public BeanExpression(BeanHolder beanHolder,
String method)
toString
public String toString()
- Overrides:
toString
in class Object
evaluate
public Object evaluate(Exchange exchange)
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
- Specified by:
evaluate
in interface Expression
- Parameters:
exchange
- the message exchange on which to evaluate the expressiontype
- the expected type of the evaluation result
- Returns:
- the value of the expression
matches
public boolean matches(Exchange exchange)
- Description copied from interface:
Predicate
- Evaluates the predicate on the message exchange and returns true if this
exchange matches the predicate
- Specified by:
matches
in interface Predicate
- Parameters:
exchange
- the message exchange
- Returns:
- true if the predicate matches
Apache CAMEL