public class BeanInfo extends Object
Constructor and Description |
---|
BeanInfo(org.apache.camel.CamelContext camelContext,
Class<?> type) |
BeanInfo(org.apache.camel.CamelContext camelContext,
Class<?> type,
Method explicitMethod,
ParameterMappingStrategy strategy,
BeanComponent beanComponent) |
BeanInfo(org.apache.camel.CamelContext camelContext,
Class<?> type,
ParameterMappingStrategy strategy,
BeanComponent beanComponent) |
BeanInfo(org.apache.camel.CamelContext camelContext,
Method explicitMethod,
ParameterMappingStrategy parameterMappingStrategy,
BeanComponent beanComponent) |
Modifier and Type | Method and Description |
---|---|
protected MethodInfo |
chooseMethod(Object pojo,
org.apache.camel.Exchange exchange,
String name)
Choose one of the available methods to invoke if we can match the message body to the body parameter
|
protected List<Annotation>[] |
collectParameterAnnotations(Class<?> c,
Method m) |
protected void |
collectParameterAnnotations(Class<?> c,
Method m,
List<Annotation>[] a) |
MethodInvocation |
createInvocation(Object pojo,
org.apache.camel.Exchange exchange) |
protected MethodInfo |
createMethodInfo(Class<?> clazz,
Method method) |
org.apache.camel.CamelContext |
getCamelContext() |
static String |
getGetterShorthandName(Method method) |
MethodInfo |
getMethodInfo(Method method)
Returns the
MethodInfo for the given method if it exists or null if there is no metadata available for
the given method |
List<MethodInfo> |
getMethods()
Gets the list of methods sorted by A..Z method name.
|
Class<?> |
getType() |
boolean |
hasAnyMethodHandlerAnnotation()
Does any of the methods have a Canel @Handler annotation.
|
boolean |
hasMethod(String methodName)
Do we have a method with the given name.
|
boolean |
hasPublicConstructors()
Returns whether the bean class has any public constructors.
|
boolean |
hasPublicNoArgConstructors()
Returns whether the bean class has any public no-arg constructors.
|
boolean |
hasStaticMethod(String methodName)
Do we have a static method with the given name.
|
static boolean |
isGetter(Method method) |
static boolean |
isSetter(Method method) |
protected boolean |
isValidMethod(Class<?> clazz,
Method method)
Validates whether the given method is a valid candidate for Camel Bean Binding.
|
public BeanInfo(org.apache.camel.CamelContext camelContext, Class<?> type)
public BeanInfo(org.apache.camel.CamelContext camelContext, Method explicitMethod, ParameterMappingStrategy parameterMappingStrategy, BeanComponent beanComponent)
public BeanInfo(org.apache.camel.CamelContext camelContext, Class<?> type, ParameterMappingStrategy strategy, BeanComponent beanComponent)
public BeanInfo(org.apache.camel.CamelContext camelContext, Class<?> type, Method explicitMethod, ParameterMappingStrategy strategy, BeanComponent beanComponent)
public Class<?> getType()
public org.apache.camel.CamelContext getCamelContext()
public MethodInvocation createInvocation(Object pojo, org.apache.camel.Exchange exchange) throws AmbiguousMethodCallException, MethodNotFoundException
public MethodInfo getMethodInfo(Method method)
MethodInfo
for the given method if it exists or null if there is no metadata available for
the given methodprotected MethodInfo createMethodInfo(Class<?> clazz, Method method)
protected List<Annotation>[] collectParameterAnnotations(Class<?> c, Method m)
protected void collectParameterAnnotations(Class<?> c, Method m, List<Annotation>[] a)
protected MethodInfo chooseMethod(Object pojo, org.apache.camel.Exchange exchange, String name) throws AmbiguousMethodCallException
pojo
- the bean to invoke a method onexchange
- the message exchangename
- an optional name of the method that must match, use null to
indicate all methodsAmbiguousMethodCallException
- is thrown if cannot choose method due to ambiguityprotected boolean isValidMethod(Class<?> clazz, Method method)
clazz
- the classmethod
- the methodpublic boolean hasMethod(String methodName)
methodName
- the method namepublic boolean hasStaticMethod(String methodName)
methodName
- the method namepublic boolean hasPublicConstructors()
public boolean hasPublicNoArgConstructors()
public List<MethodInfo> getMethods()
public boolean hasAnyMethodHandlerAnnotation()
public static boolean isGetter(Method method)
public static boolean isSetter(Method method)
Apache Camel