@Metadata(label="language,core,java",
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, getOtherAttributes, getPredicate, getTrim, matches, setExpression, setExpressionType, setExpressionValue, setId, setOtherAttributes, setProperty, setTrimpublic MethodCallExpression()
public MethodCallExpression(String beanName)
public MethodCallExpression(String beanName, String method)
public MethodCallExpression(Object instance)
public MethodCallExpression(Object instance, String method)
public MethodCallExpression(Class<?> type)
public MethodCallExpression(Class<?> type, String method)
public String getLanguage()
getLanguage in class ExpressionDefinitionpublic 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 ExpressionDefinitionpublic Predicate createPredicate(CamelContext camelContext)
createPredicate in class ExpressionDefinitionprotected 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 methodpublic String toString()
toString in class ExpressionDefinitionApache Camel