public final class Annotations
extends java.lang.Object
Re-adapted from Guice.
| Modifier and Type | Class and Description |
|---|---|
static interface |
Annotations.CannotBeCreated
An annotation that implies that the annotated type cannot be dynamically
created using
create(Class) |
| Constructor and Description |
|---|
Annotations() |
| Modifier and Type | Method and Description |
|---|---|
static <T extends java.lang.annotation.Annotation> |
create(@NotNull java.lang.Class<T> type)
Creates a new annotation with no values.
|
static <T extends java.lang.annotation.Annotation> |
create(@NotNull java.lang.Class<T> type,
@NotNull java.util.Map<java.lang.String,java.lang.Object> members)
Creates a new annotation with the given map values.
|
static <T extends java.lang.annotation.Annotation> |
create(@NotNull java.lang.Class<T> type,
java.lang.Object... members)
Creates a new annotation with the given map values.
|
@NotNull
public static <T extends java.lang.annotation.Annotation> T create(@NotNull
@NotNull java.lang.Class<T> type)
T - Annotation typetype - The annotation type@NotNull
public static <T extends java.lang.annotation.Annotation> T create(@NotNull
@NotNull java.lang.Class<T> type,
@NotNull
@NotNull java.util.Map<java.lang.String,java.lang.Object> members)
Note that the map may also use Suppliers instead of direct
values.
T - Annotation typetype - The annotation typemembers - The annotation members@NotNull
public static <T extends java.lang.annotation.Annotation> T create(@NotNull
@NotNull java.lang.Class<T> type,
@NotNull
java.lang.Object... members)
Note that the map may also use Suppliers instead of direct
values.
T - Annotation typetype - The annotation type