Class GoogleAdsAllVersionsCodeGenerator

  • All Implemented Interfaces:
    Generator

    public class GoogleAdsAllVersionsCodeGenerator
    extends java.lang.Object
    implements Generator
    Generates code for and writes the GoogleAdsAllVersions interface, which provides methods for accessing the GoogleAdsVersion service for each available version of the API as well as a getLatestVersion method.

    Example generated code snippets:

     public interface GoogleAdsAllVersions {
       GoogleAdsVersion getVersion1();
    
       com.google.ads.googleads.v2.services.GoogleAdsVersion getVersion2();
    
       com.google.ads.googleads.v2.services.GoogleAdsVersion getLatestVersion();
     }
      
    • Constructor Summary

      Constructors 
      Constructor Description
      GoogleAdsAllVersionsCodeGenerator​(java.util.Set<java.lang.Integer> versions, int latestVersion, java.io.File targetDirectory)
      Creates an instance of the generator.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      com.squareup.javapoet.JavaFile generate()
      Generates the code for the GoogleAdsAllVersions interface and writes the file.
      • Methods inherited from class java.lang.Object

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

      • GoogleAdsAllVersionsCodeGenerator

        public GoogleAdsAllVersionsCodeGenerator​(java.util.Set<java.lang.Integer> versions,
                                                 int latestVersion,
                                                 java.io.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 Detail

      • generate

        public com.squareup.javapoet.JavaFile generate()
        Generates the code for the GoogleAdsAllVersions interface and writes the file.
        Specified by:
        generate in interface Generator
        Returns: