Package com.google.ads.googleads.codegen
Class Utils
- java.lang.Object
-
- com.google.ads.googleads.codegen.Utils
-
public class Utils extends java.lang.ObjectProvides 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.JavaFilecreateJavaFile(java.lang.String packageName, com.squareup.javapoet.TypeSpec typeSpec)static com.squareup.javapoet.ClassNamecreateServiceClientClassName(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.AnnotationSpecgeneratedAnnotation()Creates the @Generated annotationstatic voidwriteGeneratedClassToFile(com.squareup.javapoet.JavaFile javaFile, java.io.File targetDirectory)
-
-
-
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)
-
-