| Modifier and Type | Field and Description |
|---|---|
| private static final Type[] |
| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| public static Class | |
| public static Type | |
| private static Type[] | |
| private static Type[] | |
| public static Type[] | |
| public static Type[] | findInterfaceParameterizedTypes(Class<?> root, ParameterizedType rootType, Class<?> searchedForInterface)
|
| public static Type[] | findParameterizedTypes(Class<?> root, Class<?> searchedFor)
Search for the given interface or class within the root's class/interface hierarchy. |
| public static Type[] | Returns: type arguments of the interfaceGiven a class and an interfaces, go through the class hierarchy to find the interface and return its type arguments. |
| public static Class | |
| public static Class | |
| public static Method | getImplementingMethod(Class<T> clazz, Method intfMethod)
Given a method and a root class, find the actual method declared in the root that implements the method. |
| public static Class | |
| public static Class | |
| public static Class | |
| public static Class | |
| public static Class | |
| public static Class | Returns: null if there is no type parameterReturns the type argument from a parameterized type |
| public static boolean | |
| public static boolean | isCompatible(Method method, Method intfMethod)
See if the two methods are compatible, that is they have the same relative signature |
| private static Map | |
| private static Type[] | |
| public static Type | Returns: actual type of the type variableFinds an actual value of a type variable. |
| public static Type | |
| private static Object | |
| public static <T> boolean |
| EMPTY_TYPE_ARRAY | back to summary |
|---|---|
| private static final Type[] EMPTY_TYPE_ARRAY | |
| Types | back to summary |
|---|---|
| private Types() | |
| boxedClass | back to summary |
|---|---|
| public static Class | |
| boxedType | back to summary |
|---|---|
| public static Type boxedType(Type type) Gets the boxed type of a class | |
| extractTypes | back to summary |
|---|---|
| private static Type[] extractTypes(Map<String, Type> typeVarMap, Type genericSub) | |
| extractTypeVariables | back to summary |
|---|---|
| private static Type[] extractTypeVariables(Map<String, Type> typeVarMap, Type[] types) | |
| findClassParameterizedTypes | back to summary |
|---|---|
| public static Type[] findClassParameterizedTypes(Class<?> root, ParameterizedType rootType, Class<?> searchedForClass) | |
| findInterfaceParameterizedTypes | back to summary |
|---|---|
| public static Type[] findInterfaceParameterizedTypes(Class<?> root, ParameterizedType rootType, Class<?> searchedForInterface) | |
| findParameterizedTypes | back to summary |
|---|---|
| public static Type[] findParameterizedTypes(Class<?> root, Class<?> searchedFor) Search for the given interface or class within the root's class/interface hierarchy. If the searched for class/interface is a generic return an array of real types that fill it out. | |
| getActualTypeArgumentsOfAnInterface | back to summary |
|---|---|
| public static Type[] getActualTypeArgumentsOfAnInterface(Class<?> classToSearch, Class<?> interfaceToFind) Given a class and an interfaces, go through the class hierarchy to find the interface and return its type arguments.
| |
| getArgumentType | back to summary |
|---|---|
| public static Class Gets the index-th type argument. | |
| getCollectionBaseType | back to summary |
|---|---|
| public static Class | |
| getImplementingMethod | back to summary |
|---|---|
| public static Method getImplementingMethod(Class<T> clazz, Method intfMethod) Given a method and a root class, find the actual method declared in the root that implements the method. | |
| getMapKeyType | back to summary |
|---|---|
| public static Class | |
| getMapValueType | back to summary |
|---|---|
| public static Class | |
| getRawType | back to summary |
|---|---|
| public static Class | |
| getRawTypeNoException | back to summary |
|---|---|
| public static Class | |
| getTemplateParameterOfInterface | back to summary |
|---|---|
| public static Class | |
| getTypeArgument | back to summary |
|---|---|
| public static Class Returns the type argument from a parameterized type
| |
| isA | back to summary |
|---|---|
| public static boolean isA(Class<T> clazz, ParameterizedType pType) Is the genericType of a certain class? | |
| isCompatible | back to summary |
|---|---|
| public static boolean isCompatible(Method method, Method intfMethod) See if the two methods are compatible, that is they have the same relative signature | |
| populateParameterizedMap | back to summary |
|---|---|
| private static Map | |
| recurseSuperclassForInterface | back to summary |
|---|---|
| private static Type[] recurseSuperclassForInterface(Class<?> searchedForInterface, Map<String, Type> typeVarMap, Type genericSub, Class<?> sub) | |
| resolveTypeVariable | back to summary |
|---|---|
| public static Type resolveTypeVariable(Class<?> root, TypeVariable<?> typeVariable) Finds an actual value of a type variable. The method looks in a class hierarchy for a class defining the variable and returns the value if present.
| |
| resolveTypeVariables | back to summary |
|---|---|
| public static Type resolveTypeVariables(Class<?> root, Type type) | |
| searchForInterfaceTemplateParameter | back to summary |
|---|---|
| private static Object searchForInterfaceTemplateParameter(Class<T> base, Class<T> desiredInterface) | |
| supports | back to summary |
|---|---|
| public static <T> boolean supports(Class<T> type, Object object, Class<?> fromInterface) Grabs the parameterized type of fromInterface that object implements and sees if it is assignable from type. | |