Class Utils

java.lang.Object
com.google.ads.googleads.codegen.Utils

public class Utils extends Object
Provides access to utility methods used in code generation during annotation processing.
  • Constructor Details

    • Utils

      public Utils()
  • Method Details

    • generatedAnnotation

      public static com.squareup.javapoet.AnnotationSpec generatedAnnotation()
      Creates the @Generated annotation
    • createServiceClientClassName

      public static com.squareup.javapoet.ClassName createServiceClientClassName(int version, String serviceClient)
      Constructs a class name given a version of the Google Ads library and a service client.
      Parameters:
      version - of the Google Ads library.
      serviceClient - the service client for which the class is being created.
      Returns:
      ClassName object for the given version of the library and service client.
    • createJavaFile

      public static com.squareup.javapoet.JavaFile createJavaFile(String packageName, com.squareup.javapoet.TypeSpec typeSpec)
    • writeGeneratedClassToFile

      public static void writeGeneratedClassToFile(com.squareup.javapoet.JavaFile javaFile, File targetDirectory)