Package com.google.auto.common
Class GeneratedAnnotationSpecs
- java.lang.Object
-
- com.google.auto.common.GeneratedAnnotationSpecs
-
public final class GeneratedAnnotationSpecs extends java.lang.Object
Utility methods for writing@Generated
annotations using JavaPoet.
-
-
Constructor Summary
Constructors Modifier Constructor Description private
GeneratedAnnotationSpecs()
-
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
.private static java.util.Optional<com.squareup.javapoet.AnnotationSpec.Builder>
generatedAnnotationSpecBuilder(javax.lang.model.util.Elements elements, java.lang.Class<?> processorClass)
private static java.util.Optional<com.squareup.javapoet.AnnotationSpec.Builder>
generatedAnnotationSpecBuilder(javax.lang.model.util.Elements elements, javax.lang.model.SourceVersion sourceVersion, java.lang.Class<?> processorClass)
-
-
-
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.Generated
orjavax.annotation.Generated
is 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.Generated
orjavax.annotation.Generated
is 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.Generated
for JDK 9 and newer,javax.annotation.Generated
for 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.Generated
for JDK 9 and newer,javax.annotation.Generated
for earlier releases, and Optional#empty()} if the annotation is not available.
-
generatedAnnotationSpecBuilder
private static java.util.Optional<com.squareup.javapoet.AnnotationSpec.Builder> generatedAnnotationSpecBuilder(javax.lang.model.util.Elements elements, java.lang.Class<?> processorClass)
-
generatedAnnotationSpecBuilder
private static java.util.Optional<com.squareup.javapoet.AnnotationSpec.Builder> generatedAnnotationSpecBuilder(javax.lang.model.util.Elements elements, javax.lang.model.SourceVersion sourceVersion, java.lang.Class<?> processorClass)
-
-