public class AnnotationUtils extends Object
Modifier and Type | Method and Description |
---|---|
static Annotation[] |
annotationsOfMethodParameter(Method method,
int index) |
static BindTo |
bindto(Class<?> clazz) |
static <A extends Annotation> |
findAnnotation(Annotation[] annotations,
Class<A> annotationType) |
static <A extends Annotation> |
findAnnotation(Annotation[] annotations,
Class<A> annotationType,
boolean deep) |
static <A extends Annotation> |
findAnnotation(Class<?> klass,
Class<A> annotationType) |
static <A extends Annotation> |
findAnnotation(Class<?> klass,
Class<A> annotationType,
boolean deep) |
static <A extends Annotation> |
findAnnotation(Method method,
Class<A> annotationType) |
static <A extends Annotation> |
findAnnotation(Method method,
Class<A> annotationType,
boolean deep) |
static String[] |
getDependsOn(Object instance) |
static String |
getEvicts(Object instance) |
static List<Annotation> |
harvestQualifiers(Class<?> klass) |
static boolean |
isAnnotatedWith(Annotation annotation,
Class<? extends Annotation> annotationType) |
static boolean |
isAnnotatedWith(Annotation annotation,
Class<? extends Annotation> annotationType,
boolean deep) |
static boolean |
isAnnotatedWith(Class<?> clazz,
Class<? extends Annotation> annotationType) |
static boolean |
isAnnotatedWith(Method method,
Class<? extends Annotation> annotationType) |
static boolean |
isAnnotatedWith(Method method,
Class<? extends Annotation> annotationType,
boolean deep) |
static boolean |
isAnnotatedWith(Object instance,
Class<? extends Annotation> annotationType) |
static <T> Map<String,T> |
mapInstancesByName(Collection<T> instances,
String suffix) |
static <T> Map<String,T> |
mapInstancesByName(Collection<T> instances,
String suffix,
String type) |
static Named |
named(String name) |
static String |
nameFor(Class<?> klass) |
static String |
nameFor(Class<?> klass,
boolean simple) |
static String |
nameFor(Field field) |
static String |
nameFor(Field field,
boolean simple) |
static String |
nameFor(Method setterMethod) |
static String |
nameFor(Object instance) |
static String |
nameFor(Object instance,
boolean simple) |
static String[] |
namesFor(Field field) |
static String[] |
namesFor(Method setterMethod) |
static Class<?> |
parameterTypeAt(Method method,
int index) |
static <T> Class<T> |
requireAnnotation(Class<T> klass,
Class<? extends Annotation> annotationType) |
static <T> T |
requireAnnotation(T instance,
Class<? extends Annotation> annotationType) |
static <T> Map<String,T> |
sortByDependencies(Collection<T> instances,
String suffix,
String type) |
static <T> Map<String,T> |
sortByDependencies(Collection<T> instances,
String suffix,
String type,
List<String> order) |
static Typed |
typed(Class<?> clazz) |
@Nonnull public static List<Annotation> harvestQualifiers(@Nonnull Class<?> klass)
@Nullable public static <A extends Annotation> A findAnnotation(@Nonnull Class<?> klass, @Nonnull Class<A> annotationType)
@Nullable public static <A extends Annotation> A findAnnotation(@Nonnull Class<?> klass, @Nonnull Class<A> annotationType, boolean deep)
@Nullable public static <A extends Annotation> A findAnnotation(@Nonnull Method method, @Nonnull Class<A> annotationType)
@Nullable public static <A extends Annotation> A findAnnotation(@Nonnull Method method, @Nonnull Class<A> annotationType, boolean deep)
@Nullable public static <A extends Annotation> A findAnnotation(@Nonnull Annotation[] annotations, @Nonnull Class<A> annotationType)
@Nullable public static <A extends Annotation> A findAnnotation(@Nonnull Annotation[] annotations, @Nonnull Class<A> annotationType, boolean deep)
public static boolean isAnnotatedWith(@Nonnull Object instance, @Nonnull Class<? extends Annotation> annotationType)
public static boolean isAnnotatedWith(@Nonnull Method method, @Nonnull Class<? extends Annotation> annotationType)
public static boolean isAnnotatedWith(@Nonnull Method method, @Nonnull Class<? extends Annotation> annotationType, boolean deep)
public static boolean isAnnotatedWith(@Nonnull Annotation annotation, @Nonnull Class<? extends Annotation> annotationType)
public static boolean isAnnotatedWith(@Nonnull Annotation annotation, @Nonnull Class<? extends Annotation> annotationType, boolean deep)
public static boolean isAnnotatedWith(@Nonnull Class<?> clazz, @Nonnull Class<? extends Annotation> annotationType)
@Nonnull public static <T> T requireAnnotation(@Nonnull T instance, @Nonnull Class<? extends Annotation> annotationType)
@Nonnull public static <T> Class<T> requireAnnotation(@Nonnull Class<T> klass, @Nonnull Class<? extends Annotation> annotationType)
@Nonnull public static Annotation[] annotationsOfMethodParameter(@Nonnull Method method, int index)
@Nonnull public static <T> Map<String,T> mapInstancesByName(@Nonnull Collection<T> instances, @Nonnull String suffix)
@Nonnull public static <T> Map<String,T> mapInstancesByName(@Nonnull Collection<T> instances, @Nonnull String suffix, @Nonnull String type)
@Nonnull public static <T> Map<String,T> sortByDependencies(@Nonnull Collection<T> instances, @Nonnull String suffix, @Nonnull String type)
@Nonnull public static <T> Map<String,T> sortByDependencies(@Nonnull Collection<T> instances, @Nonnull String suffix, @Nonnull String type, @Nonnull List<String> order)