Class Utils
- java.lang.Object
-
- com.google.ads.googleads.annotations.impl.generators.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.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(java.lang.String packageName, com.squareup.javapoet.TypeSpec typeSpec, javax.annotation.processing.Messager messager, javax.annotation.processing.Filer filer)
-
-
-
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.
-
writeGeneratedClassToFile
public static void writeGeneratedClassToFile(java.lang.String packageName, com.squareup.javapoet.TypeSpec typeSpec, javax.annotation.processing.Messager messager, javax.annotation.processing.Filer filer)- Parameters:
packageName- the name of the package.typeSpec- the generated type.
-
-