Class DefaultMethodDescriptor

    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      <A extends java.lang.annotation.Annotation>
      java.util.Optional<A>
      findAnnotation​(java.lang.Class<A> annotationType)
      Find the first annotation of annotationType that is either present or meta-present on the Method for this descriptor.
      <A extends java.lang.annotation.Annotation>
      java.util.List<A>
      findRepeatableAnnotations​(java.lang.Class<A> annotationType)
      Find all repeatable annotations of annotationType that are either present or meta-present on the Method for this descriptor.
      java.lang.reflect.Method getMethod()
      Get the method for this descriptor.
      (package private) MethodBasedTestDescriptor getTestDescriptor()  
      boolean isAnnotated​(java.lang.Class<? extends java.lang.annotation.Annotation> annotationType)
      Determine if an annotation of annotationType is either present or meta-present on the Method for this descriptor.
      java.lang.String toString()  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Method Detail

      • getMethod

        public final java.lang.reflect.Method getMethod()
        Description copied from interface: MethodDescriptor
        Get the method for this descriptor.
        Specified by:
        getMethod in interface MethodDescriptor
        Returns:
        the method; never null
      • findAnnotation

        public <A extends java.lang.annotation.Annotation> java.util.Optional<A> findAnnotation​(java.lang.Class<A> annotationType)
        Description copied from interface: MethodDescriptor
        Find the first annotation of annotationType that is either present or meta-present on the Method for this descriptor.
        Specified by:
        findAnnotation in interface MethodDescriptor
        Type Parameters:
        A - the annotation type
        Parameters:
        annotationType - the annotation type to search for; never null
        Returns:
        an Optional containing the annotation; never null but potentially empty
        See Also:
        MethodDescriptor.isAnnotated(Class), MethodDescriptor.findRepeatableAnnotations(Class)
      • findRepeatableAnnotations

        public <A extends java.lang.annotation.Annotation> java.util.List<A> findRepeatableAnnotations​(java.lang.Class<A> annotationType)
        Description copied from interface: MethodDescriptor
        Find all repeatable annotations of annotationType that are either present or meta-present on the Method for this descriptor.
        Specified by:
        findRepeatableAnnotations in interface MethodDescriptor
        Type Parameters:
        A - the annotation type
        Parameters:
        annotationType - the repeatable annotation type to search for; never null
        Returns:
        the list of all such annotations found; neither null nor mutable, but potentially empty
        See Also:
        MethodDescriptor.isAnnotated(Class), MethodDescriptor.findAnnotation(Class), Repeatable
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object