public class BeanExpression extends Object implements org.apache.camel.Expression, org.apache.camel.Predicate
Constructor and Description |
---|
BeanExpression(Class<?> type,
String method) |
BeanExpression(Object bean,
String method) |
BeanExpression(String beanName,
String method) |
Modifier and Type | Method and Description |
---|---|
Object |
evaluate(org.apache.camel.Exchange exchange) |
<T> T |
evaluate(org.apache.camel.Exchange exchange,
Class<T> type) |
Object |
getBean() |
BeanComponent |
getBeanComponent() |
String |
getBeanName() |
String |
getMethod() |
ParameterMappingStrategy |
getParameterMappingStrategy() |
org.apache.camel.BeanScope |
getScope() |
org.apache.camel.spi.Language |
getSimple() |
Class<?> |
getType() |
void |
init(org.apache.camel.CamelContext context) |
boolean |
matches(org.apache.camel.Exchange exchange) |
void |
setBeanComponent(BeanComponent beanComponent) |
void |
setParameterMappingStrategy(ParameterMappingStrategy parameterMappingStrategy) |
void |
setScope(org.apache.camel.BeanScope scope) |
void |
setSimple(org.apache.camel.spi.Language simple) |
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 String getBeanName()
public Class<?> getType()
public String getMethod()
public org.apache.camel.BeanScope getScope()
public void setScope(org.apache.camel.BeanScope scope)
public ParameterMappingStrategy getParameterMappingStrategy()
public void setParameterMappingStrategy(ParameterMappingStrategy parameterMappingStrategy)
public BeanComponent getBeanComponent()
public void setBeanComponent(BeanComponent beanComponent)
public org.apache.camel.spi.Language getSimple()
public void setSimple(org.apache.camel.spi.Language simple)
public void init(org.apache.camel.CamelContext context)
init
in interface org.apache.camel.Expression
init
in interface org.apache.camel.Predicate
public 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.Expression
public boolean matches(org.apache.camel.Exchange exchange)
matches
in interface org.apache.camel.Predicate
protected 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