Class AnnotationUtils


  • public final class AnnotationUtils
    extends Object
    Adpated from JUnit5 AnnotationUtils: https://github.com/junit-team/junit5/blob/master/junit-platform-commons/src/main/java/org/junit/platform/commons/util/AnnotationUtils.java
    • Method Detail

      • isAnnotated

        public static boolean isAnnotated​(AnnotatedElement element,
                                          Class<? extends Annotation> annotationType)
        Parameters:
        element - annotated method or class
        annotationType - annotationType Determine if an annotation of annotationType is either present or meta-present on the supplied element.
        Returns:
        true element is annotated
      • findAnnotation

        public static <A extends Annotation> A findAnnotation​(org.junit.runner.Description description,
                                                              Class<A> class1)
      • mergeDataSetAnnotations

        public static DataSet mergeDataSetAnnotations​(DataSet classLevelDataSet,
                                                      DataSet methodLevelDataSet)