Package com.google.ads.googleads.codegen
Class Utils
java.lang.Object
com.google.ads.googleads.codegen.Utils
Provides access to utility methods used in code generation during annotation processing.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic com.squareup.javapoet.JavaFilecreateJavaFile(String packageName, com.squareup.javapoet.TypeSpec typeSpec) static com.squareup.javapoet.ClassNamecreateServiceClientClassName(int version, String serviceClient) Constructs a class name given a version of the Google Ads library and a service client.static com.squareup.javapoet.AnnotationSpecCreates the @Generated annotationstatic voidwriteGeneratedClassToFile(com.squareup.javapoet.JavaFile javaFile, File targetDirectory)
-
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)
-