Class AndroidProcessor

  • All Implemented Interfaces:
    javax.annotation.processing.Processor

    @IncrementalAnnotationProcessor(ISOLATING)
    @AutoService(javax.annotation.processing.Processor.class)
    public final class AndroidProcessor
    extends com.google.auto.common.BasicAnnotationProcessor
    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.

    • Nested Class Summary

      • Nested classes/interfaces inherited from class com.google.auto.common.BasicAnnotationProcessor

        com.google.auto.common.BasicAnnotationProcessor.ProcessingStep, com.google.auto.common.BasicAnnotationProcessor.Step
    • Field Summary

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

        processingEnv
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.util.Set<java.lang.String> getSupportedOptions()  
      javax.lang.model.SourceVersion getSupportedSourceVersion()  
      protected java.lang.Iterable<? extends com.google.auto.common.BasicAnnotationProcessor.Step> steps()  
      • Methods inherited from class com.google.auto.common.BasicAnnotationProcessor

        asStep, getSupportedAnnotationTypes, init, initSteps, postProcess, postRound, 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
    • Constructor Detail

      • AndroidProcessor

        public AndroidProcessor()
    • Method Detail

      • steps

        protected java.lang.Iterable<? extends com.google.auto.common.BasicAnnotationProcessor.Step> steps()
        Overrides:
        steps in class com.google.auto.common.BasicAnnotationProcessor
      • getSupportedOptions

        public java.util.Set<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