public class BeanLanguage extends Object implements Language, IsSingleton
beanName.methodName which is then invoked using the
beanName to lookup in the bean integration to bind the
Exchange to the method arguments.
As of Camel 1.5 the bean language also supports invoking a provided bean by
its classname or the bean itself.| Constructor and Description |
|---|
BeanLanguage() |
| Modifier and Type | Method and Description |
|---|---|
static Expression |
bean(Class<?> beanType,
String method)
Creates the expression for invoking the bean type.
|
static Expression |
bean(Object bean,
String method)
Creates the expression for invoking the bean type.
|
static Expression |
bean(String expression)
Creates the expression based on the string syntax.
|
Expression |
createExpression(Object bean,
String method) |
Expression |
createExpression(String expression)
Creates an expression based on the given string input
|
Predicate |
createPredicate(String expression)
Creates a predicate based on the given string input
|
boolean |
isSingleton()
Whether this class supports being singleton or not.
|
public static Expression bean(String expression)
expression - the string syntax beanRef.methodName where methodName can be omittedpublic static Expression bean(Class<?> beanType, String method)
beanType - the bean type to invokemethod - optional name of method to invoke for instance to avoid ambiguitypublic static Expression bean(Object bean, String method)
bean - the bean to invokemethod - optional name of method to invoke for instance to avoid ambiguitypublic Predicate createPredicate(String expression)
LanguagecreatePredicate in interface Languageexpression - the expressionpublic Expression createExpression(String expression)
LanguagecreateExpression in interface Languageexpression - the expression as a string inputpublic Expression createExpression(Object bean, String method)
public boolean isSingleton()
IsSingletonisSingleton in interface IsSingletonApache Camel