public static enum AnnotationAppender.AnnotationVisibility extends Enum<AnnotationAppender.AnnotationVisibility>
Enum Constant and Description |
---|
CLASS_FILE
The annotation is preserved in the compiled class but not visible at runtime.
|
INVISIBLE
The annotation is ignored.
|
RUNTIME
The annotation is preserved in the compiled class and visible at runtime.
|
Modifier and Type | Method and Description |
---|---|
boolean |
isSuppressed()
Checks if this instance represents an annotation that is not to be embedded into Java byte code, i.e.
|
boolean |
isVisible()
Checks if this instance represents an annotation that is visible at runtime, i.e.
|
static AnnotationAppender.AnnotationVisibility |
of(Annotation annotation)
Finds the annotation visibility that is declared for a given annotation.
|
static AnnotationAppender.AnnotationVisibility |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static AnnotationAppender.AnnotationVisibility[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final AnnotationAppender.AnnotationVisibility RUNTIME
public static final AnnotationAppender.AnnotationVisibility CLASS_FILE
public static final AnnotationAppender.AnnotationVisibility INVISIBLE
public static AnnotationAppender.AnnotationVisibility[] values()
for (AnnotationAppender.AnnotationVisibility c : AnnotationAppender.AnnotationVisibility.values()) System.out.println(c);
public static AnnotationAppender.AnnotationVisibility valueOf(String name)
name
- the name of the enum constant to be returned.IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is nullpublic static AnnotationAppender.AnnotationVisibility of(Annotation annotation)
annotation
- The annotation of interest.RetentionPolicy.SOURCE
will be silently ignored.public boolean isVisible()
RUNTIME
.true
if this instance represents an annotation to be visible at runtime.public boolean isSuppressed()
INVISIBLE
.true
if this instance represents an annotation to be suppressed from the byte code output.Copyright © 2014. All rights reserved.