Package com.google.ads.googleads.codegen
Class AbstractGoogleAdsClientCodeGenerator
java.lang.Object
com.google.ads.googleads.codegen.AbstractGoogleAdsClientCodeGenerator
- All Implemented Interfaces:
Generator
Generates code for and writes the AbstractGoogleAdsClient abstract class, which defines the
methods that can be used to gain access to a GoogleAdsVersion for a given version.
Example generated code snippets:
protected abstract GoogleAdsAllVersions getGoogleAdsAllVersions();
...
public GoogleAdsVersion getVersion1() { return getGoogleAdsAllVersions().getVersion1(); }
...
public com.google.ads.googleads.v2.services.GoogleAdsVersion getLatestVersion() {
return getGoogleAdsAllVersions().getLatestVersion();
}
-
Constructor Summary
ConstructorsConstructorDescriptionAbstractGoogleAdsClientCodeGenerator(Set<Integer> versions, int latestVersion, File targetDirectory) Creates an instance of the generator. -
Method Summary
Modifier and TypeMethodDescriptioncom.squareup.javapoet.JavaFilegenerate()Generates the code for the AbstractGoogleAdsClient class and writes the file.
-
Constructor Details
-
AbstractGoogleAdsClientCodeGenerator
public AbstractGoogleAdsClientCodeGenerator(Set<Integer> versions, int latestVersion, File targetDirectory) Creates an instance of the generator.- Parameters:
versions- available versions of the Google Ads library.latestVersion- the latest available version of the Google Ads library.
-
-
Method Details