|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.jboss.weld.util.reflection.Reflections
public class Reflections
Utility class for static reflection-type operations
Field Summary | |
---|---|
static Annotation[] |
EMPTY_ANNOTATIONS
|
static Class<?>[] |
EMPTY_CLASSES
|
static Type[] |
EMPTY_TYPES
|
Constructor Summary | |
---|---|
Reflections()
|
Method Summary | ||
---|---|---|
static Map<Class<?>,Type> |
buildTypeMap(Set<Type> types)
|
|
static
|
cast(Object obj)
|
|
static boolean |
containsWildcards(Type[] types)
|
|
static Type[] |
getActualTypeArguments(Type type)
Gets the actual type arguments of a Type |
|
static int |
getNesting(Class<?> clazz)
|
|
static Object |
getNonPrivateFinalMethodOrType(Class<?> type)
|
|
static String |
getPropertyName(Method method)
Gets the property name from a getter method. |
|
static
|
getRawType(Type type)
|
|
static boolean |
isAbstract(Method method)
Checks if a method is abstract |
|
static boolean |
isArrayType(Class<?> rawType)
Checks if raw type is array type |
|
static boolean |
isAssignableFrom(Set<Type> types1,
Set<Type> types2)
Check the assiginability of a set of flattened types. |
|
static boolean |
isAssignableFrom(Set<Type> types1,
Type type2)
Check the assiginability of a set of flattened types. |
|
static boolean |
isAssignableFrom(Type[] types1,
Type type2)
|
|
static boolean |
isAssignableFrom(Type type1,
Set<? extends Type> types2)
|
|
static boolean |
isAssignableFrom(Type type1,
Type type2)
|
|
static boolean |
isAssignableFrom(Type type1,
Type[] types2)
|
|
static boolean |
isAssignableTo(Type type1,
Type[] types2)
|
|
static boolean |
isBindings(Annotation binding)
Deprecated. |
|
static boolean |
isCacheable(Annotation[] annotations)
|
|
static boolean |
isCacheable(Set<Annotation> annotations)
|
|
static boolean |
isClassLoadable(String className,
org.jboss.weld.resources.spi.ResourceLoader resourceLoader)
|
|
static boolean |
isFinal(Class<?> clazz)
Checks if class is final |
|
static boolean |
isFinal(Member member)
Checks if member is final |
|
static boolean |
isNonStaticInnerClass(Class<?> clazz)
|
|
static boolean |
isPackagePrivate(int mod)
|
|
static boolean |
isParamerterizedTypeWithWildcard(Class<?> type)
|
|
static boolean |
isParameterizedType(Class<?> type)
Checks if type is parameterized type |
|
static boolean |
isPrimitive(Type type)
|
|
static boolean |
isPrivate(Member member)
Checks if member is private |
|
static boolean |
isSerializable(Class<?> clazz)
|
|
static boolean |
isStatic(Class<?> type)
Checks if type is static |
|
static boolean |
isStatic(Member member)
Checks if member is static |
|
static boolean |
isTransient(Member member)
|
|
static boolean |
isTypeInsideBounds(Type type,
Type[] lowerBounds,
Type[] upperBounds)
|
|
static boolean |
isTypeOrAnyMethodFinal(Class<?> type)
Checks if type or member is final |
|
static boolean |
matches(Set<Type> requiredTypes,
Set<Type> beanTypes)
Check whether whether any of the requiredTypes matches a type in beanTypes |
|
static boolean |
matches(Type requiredType,
Set<? extends Type> beanTypes)
|
|
static boolean |
matches(Type requiredType,
Type beanType)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final Type[] EMPTY_TYPES
public static final Annotation[] EMPTY_ANNOTATIONS
public static final Class<?>[] EMPTY_CLASSES
Constructor Detail |
---|
public Reflections()
Method Detail |
---|
public static Map<Class<?>,Type> buildTypeMap(Set<Type> types)
public static boolean isCacheable(Set<Annotation> annotations)
public static boolean isCacheable(Annotation[] annotations)
public static <T> T cast(Object obj)
public static String getPropertyName(Method method)
method
- The getter method
public static boolean isFinal(Class<?> clazz)
clazz
- The class to check
public static int getNesting(Class<?> clazz)
public static boolean isNonStaticInnerClass(Class<?> clazz)
public static boolean isFinal(Member member)
member
- The member to check
public static boolean isPrivate(Member member)
member
- The member to check
public static boolean isTypeOrAnyMethodFinal(Class<?> type)
type
- Type or member
public static Object getNonPrivateFinalMethodOrType(Class<?> type)
public static boolean isPackagePrivate(int mod)
public static boolean isStatic(Class<?> type)
type
- Type to check
public static boolean isStatic(Member member)
member
- Member to check
public static boolean isTransient(Member member)
public static boolean isAbstract(Method method)
method
- the method
public static Type[] getActualTypeArguments(Type type)
type
- The type to examine
public static boolean isArrayType(Class<?> rawType)
rawType
- The raw type to check
public static boolean isParameterizedType(Class<?> type)
type
- The type to check
public static boolean isParamerterizedTypeWithWildcard(Class<?> type)
public static boolean containsWildcards(Type[] types)
@Deprecated public static boolean isBindings(Annotation binding)
binding
- The binding type to check
public static boolean isAssignableFrom(Type type1, Set<? extends Type> types2)
public static boolean matches(Type requiredType, Set<? extends Type> beanTypes)
public static boolean isAssignableTo(Type type1, Type[] types2)
public static boolean isAssignableFrom(Type type1, Type[] types2)
public static boolean isAssignableFrom(Type type1, Type type2)
public static boolean matches(Type requiredType, Type beanType)
public static boolean isTypeInsideBounds(Type type, Type[] lowerBounds, Type[] upperBounds)
public static boolean isAssignableFrom(Set<Type> types1, Set<Type> types2)
types1
- the types1types2
- the type2
public static boolean matches(Set<Type> requiredTypes, Set<Type> beanTypes)
requiredTypes
- the requiredTypesbeanTypes
- the beanTypes
public static boolean isAssignableFrom(Set<Type> types1, Type type2)
types1
- the types1type2
- the type2
public static boolean isAssignableFrom(Type[] types1, Type type2)
public static boolean isSerializable(Class<?> clazz)
public static boolean isPrimitive(Type type)
public static <T> Class<T> getRawType(Type type)
public static boolean isClassLoadable(String className, org.jboss.weld.resources.spi.ResourceLoader resourceLoader)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |