Class Utils


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

      Constructors 
      Constructor Description
      Utils()  
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static com.squareup.javapoet.JavaFile createJavaFile​(java.lang.String packageName, com.squareup.javapoet.TypeSpec typeSpec)  
      static com.squareup.javapoet.ClassName createServiceClientClassName​(int version, java.lang.String serviceClient)
      Constructs a class name given a version of the Google Ads library and a service client.
      static com.squareup.javapoet.AnnotationSpec generatedAnnotation()
      Creates the @Generated annotation
      static void writeGeneratedClassToFile​(com.squareup.javapoet.JavaFile javaFile, java.io.File targetDirectory)  
      • Methods inherited from class java.lang.Object

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

      • Utils

        public Utils()
    • Method Detail

      • generatedAnnotation

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

        public static com.squareup.javapoet.ClassName createServiceClientClassName​(int version,
                                                                                   java.lang.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​(java.lang.String packageName,
                                                                    com.squareup.javapoet.TypeSpec typeSpec)
      • writeGeneratedClassToFile

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