org.xwiki.component.util
Class ReflectionMethodUtils

java.lang.Object
  extended by org.xwiki.component.util.ReflectionMethodUtils

public final class ReflectionMethodUtils
extends Object

Various Reflection tools related to Methods.

Since:
5.2M1
Version:
$Id: ef773231345a5726a3c0543f0790699429bde46a $

Method Summary
static
<A extends Annotation>
List<A>
getMethodParameterAnnotations(Method method, int index, Class<A> annotationClass)
          Get Annotations of the provided class associated to the the provided method parameter.
static
<A extends Annotation>
List<A>
getMethodParameterAnnotations(Method method, int index, Class<A> annotationClass, boolean inherits)
          Get Annotations of the provided class associated to the the provided method parameter.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getMethodParameterAnnotations

public static <A extends Annotation> List<A> getMethodParameterAnnotations(Method method,
                                                                           int index,
                                                                           Class<A> annotationClass)
Get Annotations of the provided class associated to the the provided method parameter.

Type Parameters:
A - the actual Annotation type
Parameters:
method - the method
index - the index of the parameter in the method
annotationClass - the class of the annotation
Returns:
the annotations

getMethodParameterAnnotations

public static <A extends Annotation> List<A> getMethodParameterAnnotations(Method method,
                                                                           int index,
                                                                           Class<A> annotationClass,
                                                                           boolean inherits)
Get Annotations of the provided class associated to the the provided method parameter.

Type Parameters:
A - the actual Annotation type
Parameters:
method - the method
index - the index of the parameter in the method
annotationClass - the class of the annotation
inherits - if true also search on overwritten methods from interfaces and super classes
Returns:
the annotations


Copyright © 2004–2014 XWiki. All rights reserved.