org.apache.camel.model.language
Class MethodCallExpression
java.lang.Object
org.apache.camel.model.language.ExpressionDefinition
org.apache.camel.model.language.MethodCallExpression
- All Implemented Interfaces:
- Expression, Predicate
public class MethodCallExpression
- extends ExpressionDefinition
For expressions and predicates using the
bean language
- Version:
Methods inherited from class org.apache.camel.model.language.ExpressionDefinition |
assertMatches, configureExpression, configurePredicate, createExpression, createPredicate, evaluate, evaluate, getExpression, getExpressionType, getExpressionValue, getId, getLabel, getLabel, getPredicate, getTrim, isTrim, matches, setExpression, setExpressionType, setExpressionValue, setId, setProperty, setTrim |
MethodCallExpression
public MethodCallExpression()
MethodCallExpression
public MethodCallExpression(String beanName)
MethodCallExpression
public MethodCallExpression(String beanName,
String method)
MethodCallExpression
public MethodCallExpression(Object instance)
MethodCallExpression
public MethodCallExpression(Object instance,
String method)
MethodCallExpression
public MethodCallExpression(Class<?> type)
MethodCallExpression
public MethodCallExpression(Class<?> type,
String method)
getLanguage
public String getLanguage()
- Overrides:
getLanguage
in class ExpressionDefinition
getBean
public String getBean()
setBean
public void setBean(String bean)
getRef
public String getRef()
setRef
public void setRef(String ref)
getMethod
public String getMethod()
setMethod
public void setMethod(String method)
getBeanType
public Class<?> getBeanType()
setBeanType
public void setBeanType(Class<?> beanType)
getBeanTypeName
public String getBeanTypeName()
setBeanTypeName
public void setBeanTypeName(String beanTypeName)
getInstance
public Object getInstance()
setInstance
public void setInstance(Object instance)
createExpression
public Expression createExpression(CamelContext camelContext)
- Overrides:
createExpression
in class ExpressionDefinition
createPredicate
public Predicate createPredicate(CamelContext camelContext)
- Overrides:
createPredicate
in class ExpressionDefinition
validateHasMethod
protected void validateHasMethod(CamelContext context,
Object bean,
Class<?> type,
String method)
- Validates the given bean has the method.
This implementation will skip trying to validate OGNL method name expressions.
- Parameters:
context
- camel contextbean
- the bean instancetype
- the bean typemethod
- the method, can be null if no method name provided
- Throws:
RuntimeCamelException
- is thrown if bean does not have the method
beanName
protected String beanName()
toString
public String toString()
- Overrides:
toString
in class ExpressionDefinition
Apache CAMEL