Class GoogleAdsCatalogAnnotationProcessor
- java.lang.Object
-
- javax.annotation.processing.AbstractProcessor
-
- com.google.ads.googleads.annotations.impl.GoogleAdsCatalogAnnotationProcessor
-
- All Implemented Interfaces:
javax.annotation.processing.Processor
@AutoService(javax.annotation.processing.Processor.class) public class GoogleAdsCatalogAnnotationProcessor extends javax.annotation.processing.AbstractProcessorProcesses 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.
-
-
Constructor Summary
Constructors Constructor Description GoogleAdsCatalogAnnotationProcessor()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.util.Set<java.lang.String>getSupportedAnnotationTypes()javax.lang.model.SourceVersiongetSupportedSourceVersion()voidinit(javax.annotation.processing.ProcessingEnvironment processingEnv)booleanprocess(java.util.Set<? extends javax.lang.model.element.TypeElement> annotations, javax.annotation.processing.RoundEnvironment roundEnv)
-
-
-
Method Detail
-
init
public void init(javax.annotation.processing.ProcessingEnvironment processingEnv)
- Specified by:
initin interfacejavax.annotation.processing.Processor- Overrides:
initin classjavax.annotation.processing.AbstractProcessor
-
getSupportedAnnotationTypes
public java.util.Set<java.lang.String> getSupportedAnnotationTypes()
- Specified by:
getSupportedAnnotationTypesin interfacejavax.annotation.processing.Processor- Overrides:
getSupportedAnnotationTypesin classjavax.annotation.processing.AbstractProcessor
-
getSupportedSourceVersion
public javax.lang.model.SourceVersion getSupportedSourceVersion()
- Specified by:
getSupportedSourceVersionin interfacejavax.annotation.processing.Processor- Overrides:
getSupportedSourceVersionin classjavax.annotation.processing.AbstractProcessor
-
process
public boolean process(java.util.Set<? extends javax.lang.model.element.TypeElement> annotations, javax.annotation.processing.RoundEnvironment roundEnv)- Specified by:
processin interfacejavax.annotation.processing.Processor- Specified by:
processin classjavax.annotation.processing.AbstractProcessor
-
-