@Metadata(label="language", title="Bean method") public class MethodCallExpression extends ExpressionDefinition
Constructor and Description |
---|
MethodCallExpression() |
MethodCallExpression(Class<?> type) |
MethodCallExpression(Class<?> type,
String method) |
MethodCallExpression(Object instance) |
MethodCallExpression(Object instance,
String method) |
MethodCallExpression(String beanName) |
MethodCallExpression(String beanName,
String method) |
Modifier and Type | Method and Description |
---|---|
protected String |
beanName() |
Expression |
createExpression(CamelContext camelContext) |
Predicate |
createPredicate(CamelContext camelContext) |
String |
getBean() |
Class<?> |
getBeanType() |
String |
getBeanTypeName() |
Object |
getInstance() |
String |
getLanguage() |
String |
getMethod() |
String |
getRef() |
void |
setBean(String bean)
Either a reference or a class name of the bean to use
|
void |
setBeanType(Class<?> beanType) |
void |
setBeanTypeName(String beanTypeName)
Class name of the bean to use
|
void |
setInstance(Object instance) |
void |
setMethod(String method)
Name of method to call
|
void |
setRef(String ref)
Reference to bean to lookup in the registry
|
String |
toString() |
protected void |
validateHasMethod(CamelContext context,
Object bean,
Class<?> type,
String method)
Validates the given bean has the method.
|
assertMatches, configureExpression, configurePredicate, createExpression, createPredicate, evaluate, evaluate, getExpression, getExpressionType, getExpressionValue, getId, getLabel, getLabel, getPredicate, getTrim, matches, setExpression, setExpressionType, setExpressionValue, setId, setProperty, setTrim
public MethodCallExpression()
public MethodCallExpression(String beanName)
public MethodCallExpression(Object instance)
public MethodCallExpression(Class<?> type)
public String getLanguage()
getLanguage
in class ExpressionDefinition
public String getBean()
public void setBean(String bean)
public String getRef()
public void setRef(String ref)
public String getMethod()
public void setMethod(String method)
public Class<?> getBeanType()
public void setBeanType(Class<?> beanType)
public String getBeanTypeName()
public void setBeanTypeName(String beanTypeName)
public Object getInstance()
public void setInstance(Object instance)
public Expression createExpression(CamelContext camelContext)
createExpression
in class ExpressionDefinition
public Predicate createPredicate(CamelContext camelContext)
createPredicate
in class ExpressionDefinition
protected void validateHasMethod(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 providedRuntimeCamelException
- is thrown if bean does not have the methodprotected String beanName()
public String toString()
toString
in class ExpressionDefinition
Apache Camel