public class AnnotationUtils extends Object
Modifier and Type | Method and Description |
---|---|
static BindTo |
bindto(Class<?> clazz) |
static String[] |
getDependsOn(Object instance) |
static List<Annotation> |
harvestQualifiers(Class<?> klass) |
static boolean |
isAnnotatedWith(Class<?> clazz,
Class<? extends Annotation> annotationType) |
static boolean |
isAnnotatedWith(Object instance,
Class<? extends Annotation> annotationType) |
static <T> Map<String,T> |
mapInstancesByName(Collection<T> instances,
String suffix) |
static javax.inject.Named |
named(String name) |
static String |
nameFor(Object instance,
String suffix) |
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)
public static boolean isAnnotatedWith(@Nonnull Object instance, @Nonnull Class<? extends Annotation> annotationType)
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 <T> Map<String,T> mapInstancesByName(@Nonnull Collection<T> instances, @Nonnull String suffix)
@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)