Class AbstractAnnotationProcessingTest


  • @ExtendWith(io.microsphere.test.annotation.processing.CompilerInvocationInterceptor.class)
    public abstract class AbstractAnnotationProcessingTest
    extends java.lang.Object
    Abstract Annotation Processing Test case
    Since:
    1.0.0
    Author:
    Mercy
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      protected void addCompiledClasses​(java.util.Set<java.lang.Class<?>> compiledClasses)
      The classes to be compiled.
      protected void afterTest​(org.junit.jupiter.api.extension.ReflectiveInvocationContext<java.lang.reflect.Method> invocationContext, org.junit.jupiter.api.extension.ExtensionContext extensionContext, java.lang.Object result, java.lang.Throwable failure)
      After Test
      protected void beforeTest​(org.junit.jupiter.api.extension.ReflectiveInvocationContext<java.lang.reflect.Method> invocationContext, org.junit.jupiter.api.extension.ExtensionContext extensionContext)
      Before Test
      protected void initTestClass​(java.lang.Class<?> testClass)  
      • Methods inherited from class java.lang.Object

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

      • NULL_TYPE_MIRROR

        protected static final javax.lang.model.type.TypeMirror NULL_TYPE_MIRROR
      • EMPTY_TYPE_MIRROR_ARRAY

        protected static final javax.lang.model.type.TypeMirror[] EMPTY_TYPE_MIRROR_ARRAY
      • NULL_TYPE_MIRROR_ARRAY

        protected static final javax.lang.model.type.TypeMirror[] NULL_TYPE_MIRROR_ARRAY
      • EMPTY_COLLECTION_ARRAY

        protected static final java.util.Collection[] EMPTY_COLLECTION_ARRAY
      • NULL_COLLECTION

        protected static final java.util.Collection NULL_COLLECTION
      • NULL_LIST

        protected static final java.util.List NULL_LIST
      • NULL_ELEMENT

        protected static final javax.lang.model.element.Element NULL_ELEMENT
      • NULL_ELEMENT_KIND

        protected static final javax.lang.model.element.ElementKind NULL_ELEMENT_KIND
      • EMPTY_ELEMENT_ARRAY

        protected static final javax.lang.model.element.Element[] EMPTY_ELEMENT_ARRAY
      • NULL_ELEMENT_ARRAY

        protected static final javax.lang.model.element.Element[] NULL_ELEMENT_ARRAY
      • NULL_TYPE_ELEMENT

        protected static final javax.lang.model.element.TypeElement NULL_TYPE_ELEMENT
      • NULL_TYPE_ARRAY

        protected static final java.lang.reflect.Type[] NULL_TYPE_ARRAY
      • EMPTY_TYPE_ARRAY

        protected static final java.lang.reflect.Type[] EMPTY_TYPE_ARRAY
      • NULL_TYPE

        protected static final java.lang.reflect.Type NULL_TYPE
      • NULL_PROCESSING_ENVIRONMENT

        protected static final javax.annotation.processing.ProcessingEnvironment NULL_PROCESSING_ENVIRONMENT
      • NULL_STRING

        protected static final java.lang.String NULL_STRING
      • NULL_STRING_ARRAY

        protected static final java.lang.String[] NULL_STRING_ARRAY
      • NULL_CLASS

        protected static final java.lang.Class NULL_CLASS
      • NULL_CLASS_ARRAY

        protected static final java.lang.Class[] NULL_CLASS_ARRAY
      • NULL_ANNOTATED_CONSTRUCT

        protected static final javax.lang.model.AnnotatedConstruct NULL_ANNOTATED_CONSTRUCT
      • NULL_PREDICATE_ARRAY

        protected static final java.util.function.Predicate[] NULL_PREDICATE_ARRAY
      • NULL_FIELD

        protected static final javax.lang.model.element.VariableElement NULL_FIELD
      • NULL_MODIFIER

        protected static final javax.lang.model.element.Modifier NULL_MODIFIER
      • NULL_MODIFIER_ARRAY

        protected static final javax.lang.model.element.Modifier[] NULL_MODIFIER_ARRAY
      • NULL_METHOD

        protected static final javax.lang.model.element.ExecutableElement NULL_METHOD
      • NULL_METHOD_ARRAY

        protected static final javax.lang.model.element.ExecutableElement[] NULL_METHOD_ARRAY
      • NULL_ANNOTATION_MIRROR

        protected static final javax.lang.model.element.AnnotationMirror NULL_ANNOTATION_MIRROR
      • roundEnv

        protected javax.annotation.processing.RoundEnvironment roundEnv
      • processingEnv

        protected javax.annotation.processing.ProcessingEnvironment processingEnv
      • elements

        protected javax.lang.model.util.Elements elements
      • types

        protected javax.lang.model.util.Types types
      • testClass

        protected java.lang.Class<?> testClass
      • testClassName

        protected java.lang.String testClassName
      • testTypeElement

        protected javax.lang.model.element.TypeElement testTypeElement
      • testTypeMirror

        protected javax.lang.model.type.TypeMirror testTypeMirror
      • testDeclaredType

        protected javax.lang.model.type.DeclaredType testDeclaredType
    • Constructor Detail

      • AbstractAnnotationProcessingTest

        public AbstractAnnotationProcessingTest()
    • Method Detail

      • addCompiledClasses

        protected void addCompiledClasses​(java.util.Set<java.lang.Class<?>> compiledClasses)
        The classes to be compiled.
        Parameters:
        compiledClasses - the mutable Set for classes to be compiled
      • initTestClass

        protected void initTestClass​(java.lang.Class<?> testClass)
      • beforeTest

        protected void beforeTest​(org.junit.jupiter.api.extension.ReflectiveInvocationContext<java.lang.reflect.Method> invocationContext,
                                  org.junit.jupiter.api.extension.ExtensionContext extensionContext)
        Before Test
        Parameters:
        invocationContext - ReflectiveInvocationContext
        extensionContext - ExtensionContext
      • afterTest

        protected void afterTest​(org.junit.jupiter.api.extension.ReflectiveInvocationContext<java.lang.reflect.Method> invocationContext,
                                 org.junit.jupiter.api.extension.ExtensionContext extensionContext,
                                 @Nullable
                                 java.lang.Object result,
                                 @Nullable
                                 java.lang.Throwable failure)
        After Test
        Parameters:
        invocationContext - ReflectiveInvocationContext
        extensionContext - ExtensionContext
        result - the result after test method returning
        failure - the failure after the test methods' execution