public final class GeneratedAnnotations
extends java.lang.Object
@Generated annotations.| Modifier and Type | Method and Description |
|---|---|
static java.util.Optional<javax.lang.model.element.TypeElement> |
generatedAnnotation(javax.lang.model.util.Elements elements)
Deprecated.
|
static java.util.Optional<javax.lang.model.element.TypeElement> |
generatedAnnotation(javax.lang.model.util.Elements elements,
javax.lang.model.SourceVersion sourceVersion)
Returns the element corresponding to the
@Generated annotation present at the target
SourceVersion. |
@Deprecated public static java.util.Optional<javax.lang.model.element.TypeElement> generatedAnnotation(javax.lang.model.util.Elements elements)
generatedAnnotation(Elements, SourceVersion)@Generated annotation present
in the compile-time class- or module-path.
First looks for javax.annotation.processing.Generated, and then javax.annotation.Generated. Returns whichever is in the classpath (or modulepath), or Optional.empty() if neither is.
public static java.util.Optional<javax.lang.model.element.TypeElement> generatedAnnotation(javax.lang.model.util.Elements elements,
javax.lang.model.SourceVersion sourceVersion)
@Generated annotation present at the target
SourceVersion.
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.
Copyright © 2021 Google LLC. All Rights Reserved.