Package com.google.auto.common
Class GeneratedAnnotationSpecs
- java.lang.Object
-
- com.google.auto.common.GeneratedAnnotationSpecs
-
public final class GeneratedAnnotationSpecs extends java.lang.ObjectUtility methods for writing@Generatedannotations using JavaPoet.
-
-
Method Summary
All Methods Static Methods Concrete Methods Deprecated Methods Modifier and Type Method Description static java.util.Optional<com.squareup.javapoet.AnnotationSpec>generatedAnnotationSpec(javax.lang.model.util.Elements elements, java.lang.Class<?> processorClass)Deprecated.static java.util.Optional<com.squareup.javapoet.AnnotationSpec>generatedAnnotationSpec(javax.lang.model.util.Elements elements, java.lang.Class<?> processorClass, java.lang.String comments)Deprecated.static java.util.Optional<com.squareup.javapoet.AnnotationSpec>generatedAnnotationSpec(javax.lang.model.util.Elements elements, javax.lang.model.SourceVersion sourceVersion, java.lang.Class<?> processorClass)Returns@Generated("processorClass")for the targetSourceVersion.static java.util.Optional<com.squareup.javapoet.AnnotationSpec>generatedAnnotationSpec(javax.lang.model.util.Elements elements, javax.lang.model.SourceVersion sourceVersion, java.lang.Class<?> processorClass, java.lang.String comments)Returns@Generated(value = "processorClass", comments = "comments")for the targetSourceVersion.
-
-
-
Method Detail
-
generatedAnnotationSpec
@Deprecated public static java.util.Optional<com.squareup.javapoet.AnnotationSpec> generatedAnnotationSpec(javax.lang.model.util.Elements elements, java.lang.Class<?> processorClass)Deprecated.Returns@Generated("processorClass")if eitherjavax.annotation.processing.Generatedorjavax.annotation.Generatedis available at compile time.
-
generatedAnnotationSpec
@Deprecated public static java.util.Optional<com.squareup.javapoet.AnnotationSpec> generatedAnnotationSpec(javax.lang.model.util.Elements elements, java.lang.Class<?> processorClass, java.lang.String comments)Deprecated.Returns@Generated(value = "processorClass", comments = "comments")if eitherjavax.annotation.processing.Generatedorjavax.annotation.Generatedis available at compile time.
-
generatedAnnotationSpec
public static java.util.Optional<com.squareup.javapoet.AnnotationSpec> generatedAnnotationSpec(javax.lang.model.util.Elements elements, javax.lang.model.SourceVersion sourceVersion, java.lang.Class<?> processorClass)Returns@Generated("processorClass")for the targetSourceVersion.Returns
javax.annotation.processing.Generatedfor JDK 9 and newer,javax.annotation.Generatedfor earlier releases, and Optional#empty()} if the annotation is not available.
-
generatedAnnotationSpec
public static java.util.Optional<com.squareup.javapoet.AnnotationSpec> generatedAnnotationSpec(javax.lang.model.util.Elements elements, javax.lang.model.SourceVersion sourceVersion, java.lang.Class<?> processorClass, java.lang.String comments)Returns@Generated(value = "processorClass", comments = "comments")for the targetSourceVersion.Returns
javax.annotation.processing.Generatedfor JDK 9 and newer,javax.annotation.Generatedfor earlier releases, and Optional#empty()} if the annotation is not available.
-
-