Class GoogleAdsCatalogAnnotationProcessor

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

    @AutoService(javax.annotation.processing.Processor.class)
    public class GoogleAdsCatalogAnnotationProcessor
    extends javax.annotation.processing.AbstractProcessor
    Processes annotations and dynamically generates several classes and interfaces required to define the services available in each version of API. The generated classes and interfaces are listed below:
    • GeneratedCatalog
    • VersionCatalog
    • AbstractGoogleAdsClient
    • GoogleAdsAllVersions

    The annotation processor dynamically creates a set of the available versions of the Google Ads API by finding all of the unique versionName parameters (e.g. "v1" or "v2") and catalogs by finding all of the unique catalogName parameters included in @VersionDescriptor annotations throughout the library. More information regarding the catalog system can be found in the documentation of the VersionDescriptor.java class. Upon finding all versions and catalogs, this class writes one version of each of the classes listed above for each unique combination of version and catalog.

    • 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> getSupportedAnnotationTypes()  
      javax.lang.model.SourceVersion getSupportedSourceVersion()  
      void init​(javax.annotation.processing.ProcessingEnvironment processingEnv)  
      boolean process​(java.util.Set<? extends javax.lang.model.element.TypeElement> annotations, javax.annotation.processing.RoundEnvironment roundEnv)  
      • Methods inherited from class javax.annotation.processing.AbstractProcessor

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

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

      • GoogleAdsCatalogAnnotationProcessor

        public GoogleAdsCatalogAnnotationProcessor()
    • Method Detail

      • init

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

        public java.util.Set<java.lang.String> getSupportedAnnotationTypes()
        Specified by:
        getSupportedAnnotationTypes in interface javax.annotation.processing.Processor
        Overrides:
        getSupportedAnnotationTypes 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
      • 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