Class ReflectionMethodUtils


  • public final class ReflectionMethodUtils
    extends Object
    Various Reflection tools related to Methods.
    Since:
    5.2M1
    Version:
    $Id: 69b273534dd4e191d6926b527a9f16cf48ef47ab $
    • Method Detail

      • getMethodParameterAnnotations

        public static <A extends AnnotationList<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 AnnotationList<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