Class AbstractSpiProcessor

    • Field Summary

      Fields 
      Modifier and Type Field Description
      protected Logger logger  
      protected Options options  
      protected static java.util.regex.Pattern RELEASE_PATTERN  
      • Fields inherited from class javax.annotation.processing.AbstractProcessor

        processingEnv
    • Method Summary

      All Methods Static Methods Instance Methods Abstract Methods Concrete Methods 
      Modifier and Type Method Description
      protected static boolean annotationMirrorMatches​(javax.lang.model.element.AnnotationMirror annotation, java.lang.String lookingFor)  
      protected void checkCompatibility()  
      protected void checkJavacOnLinux()  
      protected java.lang.String createProperQualifiedName​(javax.lang.model.element.TypeElement type)  
      protected static java.util.List<javax.lang.model.element.AnnotationMirror> findAnnotationMirrors​(javax.lang.model.element.TypeElement element, java.lang.String lookingFor)  
      protected java.util.Collection<javax.lang.model.element.AnnotationValue> findCollectionValueMember​(javax.lang.model.element.AnnotationMirror mirror, java.lang.String memberName)  
      protected javax.lang.model.element.AnnotationValue findSingleValueMember​(javax.lang.model.element.AnnotationMirror mirror, java.lang.String memberName)  
      protected abstract java.lang.Class<? extends java.lang.annotation.Annotation> getAnnotationClass()  
      protected void handleAnnotations​(javax.annotation.processing.RoundEnvironment roundEnv)  
      protected abstract void handleElement​(javax.lang.model.element.Element e)  
      protected boolean hasModifier​(javax.lang.model.element.Element element, javax.lang.model.element.Modifier modifier)  
      protected boolean hasPublicNoArgsConstructor​(javax.lang.model.element.TypeElement currentClass)  
      void init​(javax.annotation.processing.ProcessingEnvironment environment)  
      protected void initialize()  
      protected boolean isAbstractClass​(javax.lang.model.element.TypeElement element)  
      protected boolean isAssignable​(javax.lang.model.type.TypeMirror currentClass, javax.lang.model.type.TypeMirror type)  
      protected CheckResult isImplementation​(javax.lang.model.element.TypeElement currentClass, javax.lang.model.element.TypeElement type)  
      protected boolean isStaticClass​(javax.lang.model.element.TypeElement element)  
      boolean process​(java.util.Set<? extends javax.lang.model.element.TypeElement> annotations, javax.annotation.processing.RoundEnvironment roundEnv)  
      protected abstract void removeStaleData​(javax.annotation.processing.RoundEnvironment roundEnv)  
      protected void reportError​(javax.lang.model.element.TypeElement element, CheckResult result)  
      protected static javax.lang.model.element.TypeElement toElement​(javax.lang.model.element.AnnotationValue value)  
      protected void warning​(java.lang.String message)  
      protected abstract void writeData()  
      • Methods inherited from class javax.annotation.processing.AbstractProcessor

        getCompletions, getSupportedAnnotationTypes, getSupportedOptions, getSupportedSourceVersion, isInitialized
      • Methods inherited from class java.lang.Object

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

      • RELEASE_PATTERN

        protected static final java.util.regex.Pattern RELEASE_PATTERN
      • options

        protected Options options
      • logger

        protected Logger logger
    • Constructor Detail

      • AbstractSpiProcessor

        public AbstractSpiProcessor()
    • Method Detail

      • init

        public void init​(javax.annotation.processing.ProcessingEnvironment environment)
        Specified by:
        init in interface javax.annotation.processing.Processor
        Overrides:
        init in class javax.annotation.processing.AbstractProcessor
      • process

        public boolean process​(java.util.Set<? extends javax.lang.model.element.TypeElement> annotations,
                               javax.annotation.processing.RoundEnvironment roundEnv)
        Specified by:
        process in interface javax.annotation.processing.Processor
        Specified by:
        process in class javax.annotation.processing.AbstractProcessor
      • getAnnotationClass

        protected abstract java.lang.Class<? extends java.lang.annotation.Annotation> getAnnotationClass()
      • handleElement

        protected abstract void handleElement​(javax.lang.model.element.Element e)
      • removeStaleData

        protected abstract void removeStaleData​(javax.annotation.processing.RoundEnvironment roundEnv)
      • writeData

        protected abstract void writeData()
      • warning

        protected void warning​(java.lang.String message)
      • initialize

        protected void initialize()
      • checkCompatibility

        protected void checkCompatibility()
      • checkJavacOnLinux

        protected void checkJavacOnLinux()
      • handleAnnotations

        protected void handleAnnotations​(javax.annotation.processing.RoundEnvironment roundEnv)
      • reportError

        protected void reportError​(javax.lang.model.element.TypeElement element,
                                   CheckResult result)
      • hasPublicNoArgsConstructor

        protected boolean hasPublicNoArgsConstructor​(javax.lang.model.element.TypeElement currentClass)
      • hasModifier

        protected boolean hasModifier​(javax.lang.model.element.Element element,
                                      javax.lang.model.element.Modifier modifier)
      • isStaticClass

        protected boolean isStaticClass​(javax.lang.model.element.TypeElement element)
      • isAbstractClass

        protected boolean isAbstractClass​(javax.lang.model.element.TypeElement element)
      • isImplementation

        protected CheckResult isImplementation​(javax.lang.model.element.TypeElement currentClass,
                                               javax.lang.model.element.TypeElement type)
      • isAssignable

        protected boolean isAssignable​(javax.lang.model.type.TypeMirror currentClass,
                                       javax.lang.model.type.TypeMirror type)
      • findSingleValueMember

        protected javax.lang.model.element.AnnotationValue findSingleValueMember​(javax.lang.model.element.AnnotationMirror mirror,
                                                                                 java.lang.String memberName)
      • findCollectionValueMember

        protected java.util.Collection<javax.lang.model.element.AnnotationValue> findCollectionValueMember​(javax.lang.model.element.AnnotationMirror mirror,
                                                                                                           java.lang.String memberName)
      • createProperQualifiedName

        protected java.lang.String createProperQualifiedName​(javax.lang.model.element.TypeElement type)
      • findAnnotationMirrors

        protected static java.util.List<javax.lang.model.element.AnnotationMirror> findAnnotationMirrors​(javax.lang.model.element.TypeElement element,
                                                                                                         java.lang.String lookingFor)
      • annotationMirrorMatches

        protected static boolean annotationMirrorMatches​(javax.lang.model.element.AnnotationMirror annotation,
                                                         java.lang.String lookingFor)
      • toElement

        protected static javax.lang.model.element.TypeElement toElement​(javax.lang.model.element.AnnotationValue value)