public class BeanExpression extends Object implements org.apache.camel.Expression, org.apache.camel.Predicate, org.apache.camel.AfterPropertiesConfigured
| Constructor and Description |
|---|
BeanExpression(Class<?> type,
String method) |
BeanExpression(Object bean,
String method) |
BeanExpression(String beanName,
String method) |
| Modifier and Type | Method and Description |
|---|---|
void |
afterPropertiesConfigured(org.apache.camel.CamelContext camelContext) |
Object |
evaluate(org.apache.camel.Exchange exchange) |
<T> T |
evaluate(org.apache.camel.Exchange exchange,
Class<T> type) |
Object |
getBean() |
String |
getBeanName() |
String |
getMethod() |
Class<?> |
getType() |
void |
init(org.apache.camel.CamelContext context) |
boolean |
matches(org.apache.camel.Exchange exchange) |
void |
setBean(Object bean) |
void |
setBeanName(String beanName) |
void |
setMethod(String method) |
void |
setType(Class<?> type) |
String |
toString() |
protected void |
validateHasMethod(org.apache.camel.CamelContext context,
Object bean,
Class<?> type,
String method)
Validates the given bean has the method.
|
public Object getBean()
public void setBean(Object bean)
public String getBeanName()
public void setBeanName(String beanName)
public Class<?> getType()
public void setType(Class<?> type)
public String getMethod()
public void setMethod(String method)
public void init(org.apache.camel.CamelContext context)
init in interface org.apache.camel.Expressioninit in interface org.apache.camel.Predicatepublic Object evaluate(org.apache.camel.Exchange exchange)
public <T> T evaluate(org.apache.camel.Exchange exchange,
Class<T> type)
evaluate in interface org.apache.camel.Expressionpublic boolean matches(org.apache.camel.Exchange exchange)
matches in interface org.apache.camel.Predicatepublic void afterPropertiesConfigured(org.apache.camel.CamelContext camelContext)
afterPropertiesConfigured in interface org.apache.camel.AfterPropertiesConfiguredprotected void validateHasMethod(org.apache.camel.CamelContext context,
Object bean,
Class<?> type,
String method)
context - camel contextbean - the bean instancetype - the bean typemethod - the method, can be null if no method name providedorg.apache.camel.RuntimeCamelException - is thrown if bean does not have the methodApache Camel