|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.camel.component.bean.MethodInfo
public class MethodInfo
Information about a method to be used for invocation.
Constructor Summary | |
---|---|
MethodInfo(CamelContext camelContext,
Class<?> type,
Method method,
List<ParameterInfo> parameters,
List<ParameterInfo> bodyParameters,
boolean hasCustomAnnotation,
boolean hasHandlerAnnotation)
|
Method Summary | |
---|---|
protected void |
addTypeAndSuperTypes(Class<?> type,
List<Class<?>> result)
Adds the current class and all of its base classes (apart from Object to the given list |
boolean |
bodyParameterMatches(Class<?> bodyType)
|
MethodInvocation |
createMethodInvocation(Object pojo,
Exchange exchange)
|
protected Expression |
createParametersExpression()
|
protected Pattern |
findOneWayAnnotation(List<Class<?>> classes)
Finds the first annotation on the given list of classes |
protected Pattern |
findOneWayAnnotation(Method method)
Finds the oneway annotation in priority order; look for method level annotations first, then the class level annotations, then super class annotations then interface annotations |
protected Pattern |
findOneWayAnnotationOnMethod(List<Class<?>> classes,
Method method)
Finds the first annotation on the base methods defined in the list of classes |
List<ParameterInfo> |
getBodyParameters()
|
Class<?> |
getBodyParameterType()
|
Method |
getMethod()
|
List<ParameterInfo> |
getParameters()
|
Expression |
getParametersExpression()
|
ExchangePattern |
getPattern()
Returns the ExchangePattern that should be used when invoking this method. |
protected Pattern |
getPatternAnnotation(AnnotatedElement annotatedElement)
Returns the pattern annotation on the given annotated element; either as a direct annotation or on an annotation which is also annotated |
protected Pattern |
getPatternAnnotation(AnnotatedElement annotatedElement,
int depth)
Returns the pattern annotation on the given annotated element; either as a direct annotation or on an annotation which is also annotated |
Class<?> |
getType()
|
boolean |
hasBodyParameter()
|
boolean |
hasCustomAnnotation()
|
protected boolean |
hasExceptionParameter()
|
boolean |
hasHandlerAnnotation()
|
protected Object |
invoke(Method mth,
Object pojo,
Object[] arguments,
Exchange exchange)
|
boolean |
isReturnTypeVoid()
|
boolean |
isStaticMethod()
|
String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public MethodInfo(CamelContext camelContext, Class<?> type, Method method, List<ParameterInfo> parameters, List<ParameterInfo> bodyParameters, boolean hasCustomAnnotation, boolean hasHandlerAnnotation)
Method Detail |
---|
public String toString()
toString
in class Object
public MethodInvocation createMethodInvocation(Object pojo, Exchange exchange)
public Class<?> getType()
public Method getMethod()
public ExchangePattern getPattern()
ExchangePattern
that should be used when invoking this method. This value
defaults to ExchangePattern.InOut
unless some Pattern
annotation is used
to override the message exchange pattern.
public Expression getParametersExpression()
public List<ParameterInfo> getBodyParameters()
public Class<?> getBodyParameterType()
public boolean bodyParameterMatches(Class<?> bodyType)
public List<ParameterInfo> getParameters()
public boolean hasBodyParameter()
public boolean hasCustomAnnotation()
public boolean hasHandlerAnnotation()
public boolean isReturnTypeVoid()
public boolean isStaticMethod()
protected Object invoke(Method mth, Object pojo, Object[] arguments, Exchange exchange) throws InvocationTargetException
InvocationTargetException
protected Expression createParametersExpression()
protected Pattern findOneWayAnnotation(Method method)
method
- the method on which to search
protected Pattern getPatternAnnotation(AnnotatedElement annotatedElement)
annotatedElement
- the element to look for the annotation
protected Pattern getPatternAnnotation(AnnotatedElement annotatedElement, int depth)
annotatedElement
- the element to look for the annotationdepth
- the current depth
protected void addTypeAndSuperTypes(Class<?> type, List<Class<?>> result)
Object
to the given list
protected Pattern findOneWayAnnotationOnMethod(List<Class<?>> classes, Method method)
protected Pattern findOneWayAnnotation(List<Class<?>> classes)
protected boolean hasExceptionParameter()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |