Interface AnnotatedMethod<X>

Type Parameters:
X - the declaring type
All Superinterfaces:
Annotated, AnnotatedCallable<X>, AnnotatedMember<X>

public interface AnnotatedMethod<X> extends AnnotatedCallable<X>

Represents a method of a Java type.

See Also:
  • Method Details

    • getJavaMember

      Method getJavaMember()

      Get the underlying Method.

      Specified by:
      getJavaMember in interface AnnotatedMember<X>
      Returns:
      the Method
    • getAnnotations

      default <T extends Annotation> Set<T> getAnnotations(Class<T> annotationType)
      Description copied from interface: Annotated

      Get program element annotations of a certain annotation type.

      This method returns back all annotations, including repeatable annotations of this type. The behavior of this method is intended to be the same behavior as AnnotatedElement.getAnnotationsByType(Class), where repeatable annotations are supported.

      Specified by:
      getAnnotations in interface Annotated
      Type Parameters:
      T - the type of the annotation
      Parameters:
      annotationType - the class of the annotation type
      Returns:
      the program element annotations of the given annotation type, or an empty collection