org.apache.camel.model.language
Class MethodCallExpression

java.lang.Object
  extended by org.apache.camel.model.language.ExpressionDefinition
      extended by 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:
$Revision: 20303 $

Constructor Summary
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)
           
 
Method Summary
protected  String beanName()
           
 Expression createExpression(CamelContext camelContext)
           
 Predicate createPredicate(CamelContext camelContext)
           
 String getLanguage()
           
 String getMethod()
           
 void setMethod(String method)
           
 String toString()
           
protected  void validateHasMethod(CamelContext context, Object bean, String method)
          Validates the given bean has the method
 
Methods inherited from class org.apache.camel.model.language.ExpressionDefinition
assertMatches, configureExpression, configurePredicate, createExpression, createPredicate, evaluate, evaluate, getExpression, getExpressionType, getExpressionValue, getId, getLabel, getLabel, getPredicate, matches, setExpression, setExpressionType, setExpressionValue, setId, setProperty
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

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)
Method Detail

getLanguage

public String getLanguage()
Overrides:
getLanguage in class ExpressionDefinition

getMethod

public String getMethod()

setMethod

public void setMethod(String method)

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,
                                 String method)
Validates the given bean has the method

Parameters:
context - camel context
bean - the bean instance
method - 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