Interface AnnotatedMethod


  • public interface AnnotatedMethod
    The annotated method is a wrapping for some method providing inheritance of all annotations of the method being overridden by this one. If the same method has different annotations in different superclasses or superinterface, the last annotation met is taken. So you better maintain the same annotations in this case.

    Note: This class is a modified version of the original Fusionsoft Annotation library. See: {@link http://www.fusionsoft-online.com/articles-java-annotations.php}

    Version:
    1.0
    Author:
    Vladimir Ovchinnikov
    • Method Detail

      • getAnnotatedClass

        AnnotatedClass getAnnotatedClass()
        Returns:
        the annotated class where the method is declared.
      • getMethod

        Method getMethod()
        Returns:
        the method wrapped by the annotated method.
      • isAnnotationPresent

        boolean isAnnotationPresent​(Class<? extends Annotation> annotationClass)
        Returns true if an annotation for the specified type is present on this element, else false.
        Parameters:
        annotationClass - the Class object corresponding to the annotation type
        Returns:
        true if an annotation for the specified annotation type is present on this element, else false
      • getAllAnnotations

        Annotation[] getAllAnnotations()
        Returns:
        all inherited and declared annotations of the method.
      • getAnnotation

        <T extends Annotation> T getAnnotation​(Class<T> annotationClass)
        Parameters:
        annotationClass - of the annotation to find.
        Returns:
        the inherited or declared annotation of the specified class.
      • getParameterAnnotations

        Annotation[][] getParameterAnnotations()
        Returns an array of arrays that represent the annotations on the formal parameters, in declaration order, of the method represented by this Method object.
        Returns: