public abstract class ReflectionUtils extends Object
Modifier and Type | Field and Description |
---|---|
static List<String> |
primitiveDescriptors |
static List<String> |
primitiveNames |
static List<Class> |
primitiveTypes |
Constructor and Description |
---|
ReflectionUtils() |
Modifier and Type | Method and Description |
---|---|
protected static boolean |
areAnnotationMembersMatching(Annotation annotation1,
AnnotatedElement annotatedElement)
checks for annotation member values matching on an annotated element or it's first annotated super type, based on equality of members
|
static boolean |
areAnnotationMembersMatching(Annotation annotation1,
Annotation annotation2)
checks for annotation member values matching, based on equality of members
|
static Class<?> |
forName(String typeName,
ClassLoader... classLoaders)
tries to resolve a java type name to a Class
|
static <T> Class<? extends T>[] |
forNames(Iterable<String> classes,
ClassLoader... classLoaders)
try to resolve all given string representation of types to a list of java types
|
static <T> Collection<? extends Class<?>> |
getAllSuperTypes(Class<T> type) |
static List<AnnotatedElement> |
getAllSuperTypesAnnotatedWith(AnnotatedElement annotatedElement,
Annotation annotation)
return all super types of a given annotated element annotated with a given annotation up in hierarchy, including the given type
|
protected static <T extends AnnotatedElement> |
getMatchingAnnotations(Set<T> annotatedElements,
Annotation annotation)
returns a subset of given annotatedWith, where annotation member values matches the given annotation
|
public static <T> Collection<? extends Class<?>> getAllSuperTypes(Class<T> type)
public static List<AnnotatedElement> getAllSuperTypesAnnotatedWith(AnnotatedElement annotatedElement, Annotation annotation)
public static boolean areAnnotationMembersMatching(Annotation annotation1, Annotation annotation2)
protected static boolean areAnnotationMembersMatching(Annotation annotation1, AnnotatedElement annotatedElement)
protected static <T extends AnnotatedElement> Set<T> getMatchingAnnotations(Set<T> annotatedElements, Annotation annotation)
public static Class<?> forName(String typeName, ClassLoader... classLoaders)
if optional ClassLoader
s are not specified, then both ClasspathHelper.getContextClassLoader()
and ClasspathHelper.getStaticClassLoader()
are used
public static <T> Class<? extends T>[] forNames(Iterable<String> classes, ClassLoader... classLoaders)
Copyright © 2013-2015 JBoss, a division of Red Hat. All Rights Reserved.