Class AnnotationConsumerInitializer


  • public class AnnotationConsumerInitializer
    extends Object
    Support class for initializing instances with annotations of an annotated element in initialize(AnnotatedElement, Object)

    This is more or less a copy of org.junit.jupiter.params.support.AnnotationConsumerInitializer from the junit-jupiter-params project.

    • Method Detail

      • initialize

        public static <T> T initialize​(AnnotatedElement annotatedElement,
                                       T instance)
        Initializes an instance with an annotation set on an element
        Type Parameters:
        T - the type of the AnnotationConsumer
        Parameters:
        annotatedElement - the element which is annotated with an annotation required by the AnnotationConsumer. Should be annotated with the annotation required by the AnnotationConsumer
        instance - an instance of an AnnotationConsumer
        Returns:
        the instance of the AnnotationConsumer initialized with the required annotation