Class AbstractAnnotatedDescriptorWrapper<E extends java.lang.reflect.AnnotatedElement>

  • Direct Known Subclasses:
    DefaultClassDescriptor, DefaultMethodDescriptor

    abstract class AbstractAnnotatedDescriptorWrapper<E extends java.lang.reflect.AnnotatedElement>
    extends java.lang.Object
    Abstract base class for wrappers for test descriptors based on annotated elements.
    Since:
    5.8
    • Constructor Summary

      Constructors 
      Constructor Description
      AbstractAnnotatedDescriptorWrapper​(org.junit.platform.engine.TestDescriptor testDescriptor, E annotatedElement)  
    • 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)  
      <A extends java.lang.annotation.Annotation>
      java.util.List<A>
      findRepeatableAnnotations​(java.lang.Class<A> annotationType)  
      (package private) E getAnnotatedElement()  
      java.lang.String getDisplayName()  
      (package private) org.junit.platform.engine.TestDescriptor getTestDescriptor()  
      boolean isAnnotated​(java.lang.Class<? extends java.lang.annotation.Annotation> annotationType)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • testDescriptor

        private final org.junit.platform.engine.TestDescriptor testDescriptor
      • annotatedElement

        private final E extends java.lang.reflect.AnnotatedElement annotatedElement
    • Constructor Detail

      • AbstractAnnotatedDescriptorWrapper

        AbstractAnnotatedDescriptorWrapper​(org.junit.platform.engine.TestDescriptor testDescriptor,
                                           E annotatedElement)
    • Method Detail

      • getAnnotatedElement

        E getAnnotatedElement()
      • getTestDescriptor

        org.junit.platform.engine.TestDescriptor getTestDescriptor()
      • getDisplayName

        public final java.lang.String getDisplayName()
      • isAnnotated

        public final boolean isAnnotated​(java.lang.Class<? extends java.lang.annotation.Annotation> annotationType)
      • findAnnotation

        public final <A extends java.lang.annotation.Annotation> java.util.Optional<A> findAnnotation​(java.lang.Class<A> annotationType)
      • findRepeatableAnnotations

        public final <A extends java.lang.annotation.Annotation> java.util.List<A> findRepeatableAnnotations​(java.lang.Class<A> annotationType)