Class IndependentAnnotationEngine

    • Field Detail

      • annotationProcessorMap

        private final java.util.Map<java.lang.Class<? extends java.lang.annotation.Annotation>,​FieldAnnotationProcessor<?>> annotationProcessorMap
    • Constructor Detail

      • IndependentAnnotationEngine

        public IndependentAnnotationEngine()
    • Method Detail

      • createMockFor

        private java.lang.Object createMockFor​(java.lang.annotation.Annotation annotation,
                                               java.lang.reflect.Field field)
      • forAnnotation

        private <A extends java.lang.annotation.Annotation> FieldAnnotationProcessor<A> forAnnotation​(A annotation)
      • registerAnnotationProcessor

        private <A extends java.lang.annotation.Annotation> void registerAnnotationProcessor​(java.lang.Class<A> annotationClass,
                                                                                             FieldAnnotationProcessor<A> fieldAnnotationProcessor)
      • process

        public java.lang.AutoCloseable process​(java.lang.Class<?> clazz,
                                               java.lang.Object testInstance)
        Description copied from interface: AnnotationEngine
        Processes the test instance to configure annotated members.
        Specified by:
        process in interface AnnotationEngine
        Parameters:
        clazz - Class where to extract field information, check implementation for details
        testInstance - Test instance
      • throwIfAlreadyAssigned

        void throwIfAlreadyAssigned​(java.lang.reflect.Field field,
                                    boolean alreadyAssigned)