Class AndroidProcessor

  • All Implemented Interfaces:
    androidx.room.compiler.processing.XBasicAnnotationProcessor, javax.annotation.processing.Processor

    @IncrementalAnnotationProcessor(ISOLATING)
    @AutoService(javax.annotation.processing.Processor.class)
    public final class AndroidProcessor
    extends androidx.room.compiler.processing.javac.JavacBasicAnnotationProcessor
    An annotation processor to verify usage of dagger.android code.

    Additionally, if -Adagger.android.experimentalUseStringKeys is passed to the compilation, a file will be generated to support obfuscated injected Android types used with @AndroidInjectionKey. The fact that this is generated is deliberate: not all versions of ProGuard/R8 support -identifiernamestring, so we can't include a ProGuard file in the dagger-android artifact Instead, we generate the file in META-INF/proguard only when users enable the flag. They should only be enabling it if their shrinker supports those files, and any version that does so will also support -identifiernamestring. This was added to R8 in May 2018.

    • Field Summary

      • Fields inherited from class javax.annotation.processing.AbstractProcessor

        processingEnv
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      com.google.common.collect.ImmutableSet<java.lang.String> getSupportedOptions()  
      javax.lang.model.SourceVersion getSupportedSourceVersion()  
      void initialize​(androidx.room.compiler.processing.XProcessingEnv env)  
      java.lang.Iterable<androidx.room.compiler.processing.XProcessingStep> processingSteps()  
      • Methods inherited from class androidx.room.compiler.processing.javac.JavacBasicAnnotationProcessor

        getSupportedAnnotationTypes, getXProcessingEnv, init, process
      • Methods inherited from class javax.annotation.processing.AbstractProcessor

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

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
      • Methods inherited from interface androidx.room.compiler.processing.XBasicAnnotationProcessor

        postRound, preRound
    • Constructor Detail

      • AndroidProcessor

        public AndroidProcessor()
    • Method Detail

      • initialize

        public void initialize​(androidx.room.compiler.processing.XProcessingEnv env)
      • processingSteps

        public java.lang.Iterable<androidx.room.compiler.processing.XProcessingStep> processingSteps()
      • getSupportedOptions

        public final com.google.common.collect.ImmutableSet<java.lang.String> getSupportedOptions()
        Specified by:
        getSupportedOptions in interface javax.annotation.processing.Processor
        Overrides:
        getSupportedOptions in class javax.annotation.processing.AbstractProcessor
      • getSupportedSourceVersion

        public javax.lang.model.SourceVersion getSupportedSourceVersion()
        Specified by:
        getSupportedSourceVersion in interface javax.annotation.processing.Processor
        Overrides:
        getSupportedSourceVersion in class javax.annotation.processing.AbstractProcessor