Class AnnotationUtils


  • public final class AnnotationUtils
    extends Object
    Useful methods for working with annotation instances.
    Author:
    David Kolb
    • Method Detail

      • getMethodParameterAnnotation

        public static <A extends Annotation> A getMethodParameterAnnotation​(Method method,
                                                                            int i,
                                                                            Class<A> annotationClass)
        Attempt to retrieve the specified annotation from the i'th parameter of the specified method. This method will only find annotations with:
         @Target(ElementType.TYPE_USE)
         
        If the ElementType is different or no annotation with specified type is present, null is returned.
        Parameters:
        method -
        i -
        annotationClass -
        Returns: