public class AnnotationUtil
extends java.lang.Object
| Constructor and Description |
|---|
AnnotationUtil() |
| Modifier and Type | Method and Description |
|---|---|
static <T extends java.lang.annotation.Annotation> |
get(java.lang.reflect.AnnotatedElement type,
java.lang.Class<T> annotation) |
static <T extends java.lang.annotation.Annotation> |
get(java.lang.Class<?> type,
java.lang.Class<T> annotation) |
static <T extends java.lang.annotation.Annotation> |
get(java.lang.reflect.Type type,
java.lang.Class<T> annotation) |
static <T extends java.lang.annotation.Annotation> |
getOrThrow(java.lang.reflect.AnnotatedElement type,
java.lang.Class<T> annotation) |
static <T extends java.lang.annotation.Annotation> |
getOrThrow(java.lang.Class<?> type,
java.lang.Class<T> annotation) |
static <T extends java.lang.annotation.Annotation> |
getOrThrow(java.lang.reflect.Type type,
java.lang.Class<T> annotation) |
static <T extends java.lang.annotation.Annotation> |
ifPresent(java.lang.reflect.AnnotatedElement type,
java.lang.Class<T> annotation,
java.util.function.Consumer<T> action) |
static <T extends java.lang.annotation.Annotation> |
ifPresent(java.lang.Class<?> type,
java.lang.Class<T> annotation,
java.util.function.Consumer<T> action) |
static <T extends java.lang.annotation.Annotation> |
ifPresent(java.lang.reflect.Type type,
java.lang.Class<T> annotation,
java.util.function.Consumer<T> action) |
static boolean |
isPresent(java.lang.reflect.AnnotatedElement type,
java.lang.Class<? extends java.lang.annotation.Annotation> annotation) |
static boolean |
isPresent(java.lang.Class<?> type,
java.lang.Class<? extends java.lang.annotation.Annotation> annotation) |
static boolean |
isPresent(java.lang.reflect.Type type,
java.lang.Class<? extends java.lang.annotation.Annotation> annotation) |
static <T extends java.lang.annotation.Annotation,R> |
map(java.lang.reflect.AnnotatedElement type,
java.lang.Class<T> annotation,
java.util.function.Function<T,R> mappingFunction) |
static <T extends java.lang.annotation.Annotation,R> |
map(java.lang.reflect.AnnotatedElement type,
java.lang.Class<T> annotation,
java.util.function.Function<T,R> mappingFunction,
R defaultValue) |
static <T extends java.lang.annotation.Annotation,R> |
map(java.lang.Class<?> type,
java.lang.Class<T> annotation,
java.util.function.Function<T,R> mappingFunction) |
static <T extends java.lang.annotation.Annotation,R> |
map(java.lang.Class<?> type,
java.lang.Class<T> annotation,
java.util.function.Function<T,R> mappingFunction,
R defaultValue) |
static <T extends java.lang.annotation.Annotation,R> |
map(java.lang.reflect.Type type,
java.lang.Class<T> annotation,
java.util.function.Function<T,R> mappingFunction) |
static <T extends java.lang.annotation.Annotation,R> |
map(java.lang.reflect.Type type,
java.lang.Class<T> annotation,
java.util.function.Function<T,R> mappingFunction,
R defaultValue) |
public static boolean isPresent(java.lang.reflect.AnnotatedElement type,
java.lang.Class<? extends java.lang.annotation.Annotation> annotation)
public static <T extends java.lang.annotation.Annotation> T get(java.lang.reflect.AnnotatedElement type,
java.lang.Class<T> annotation)
public static <T extends java.lang.annotation.Annotation> T getOrThrow(java.lang.reflect.AnnotatedElement type,
java.lang.Class<T> annotation)
public static <T extends java.lang.annotation.Annotation> void ifPresent(java.lang.reflect.AnnotatedElement type,
java.lang.Class<T> annotation,
java.util.function.Consumer<T> action)
@Nullable
public static <T extends java.lang.annotation.Annotation,R> R map(java.lang.reflect.AnnotatedElement type,
java.lang.Class<T> annotation,
java.util.function.Function<T,R> mappingFunction)
public static <T extends java.lang.annotation.Annotation,R> R map(java.lang.reflect.AnnotatedElement type,
java.lang.Class<T> annotation,
java.util.function.Function<T,R> mappingFunction,
R defaultValue)
public static boolean isPresent(java.lang.Class<?> type,
java.lang.Class<? extends java.lang.annotation.Annotation> annotation)
public static <T extends java.lang.annotation.Annotation> T get(java.lang.Class<?> type,
java.lang.Class<T> annotation)
public static <T extends java.lang.annotation.Annotation> T getOrThrow(java.lang.Class<?> type,
java.lang.Class<T> annotation)
public static <T extends java.lang.annotation.Annotation> void ifPresent(java.lang.Class<?> type,
java.lang.Class<T> annotation,
java.util.function.Consumer<T> action)
@Nullable
public static <T extends java.lang.annotation.Annotation,R> R map(java.lang.Class<?> type,
java.lang.Class<T> annotation,
java.util.function.Function<T,R> mappingFunction)
public static <T extends java.lang.annotation.Annotation,R> R map(java.lang.Class<?> type,
java.lang.Class<T> annotation,
java.util.function.Function<T,R> mappingFunction,
R defaultValue)
public static boolean isPresent(java.lang.reflect.Type type,
java.lang.Class<? extends java.lang.annotation.Annotation> annotation)
public static <T extends java.lang.annotation.Annotation> T get(java.lang.reflect.Type type,
java.lang.Class<T> annotation)
public static <T extends java.lang.annotation.Annotation> T getOrThrow(java.lang.reflect.Type type,
java.lang.Class<T> annotation)
public static <T extends java.lang.annotation.Annotation> void ifPresent(java.lang.reflect.Type type,
java.lang.Class<T> annotation,
java.util.function.Consumer<T> action)
@Nullable
public static <T extends java.lang.annotation.Annotation,R> R map(java.lang.reflect.Type type,
java.lang.Class<T> annotation,
java.util.function.Function<T,R> mappingFunction)
public static <T extends java.lang.annotation.Annotation,R> R map(java.lang.reflect.Type type,
java.lang.Class<T> annotation,
java.util.function.Function<T,R> mappingFunction,
R defaultValue)