|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.jboss.resteasy.util.Types
public class Types
Type conversions and generic type manipulations
| Nested Class Summary | |
|---|---|
static class |
Types.TypeInfo
|
| Constructor Summary | |
|---|---|
Types()
|
|
| Method Summary | |
|---|---|
static Type[] |
findClassParameterizedTypes(Class<?> root,
ParameterizedType rootType,
Class<?> searchedForClass)
|
static Type[] |
findInterfaceParameterizedTypes(Class<?> root,
ParameterizedType rootType,
Class<?> searchedForInterface)
|
static Type[] |
findParameterizedTypes(Class<?> root,
Class<?> searchedFor)
Search for the given interface or class within the root's class/interface hierarchy. |
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. |
static Type |
getActualValueOfTypeVariable(Class<?> clazz,
TypeVariable<?> typeVariable)
Finds an actual value of a type variable. |
static Class |
getCollectionBaseType(Class type,
Type genericType)
|
static Type |
getGenericReturnTypeOfGenericInterfaceMethod(Class clazz,
Method method)
Given an interface Method, look in the implementing class for the method that implements the interface's method to obtain generic type information. |
static Method |
getImplementingMethod(Class clazz,
Method intfMethod)
Given a method and a root class, find the actual method declared in the root that implements the method. |
static Class |
getMapKeyType(Type genericType)
|
static Class |
getMapValueType(Type genericType)
|
static Class<?> |
getRawType(Type type)
|
static Class<?> |
getRawTypeNoException(Type type)
|
static Class |
getTemplateParameterOfInterface(Class base,
Class desiredInterface)
|
static Class<?> |
getTypeArgument(Type genericType)
Returns the type argument from a parameterized type |
static boolean |
isCompatible(Method method,
Method intfMethod)
See if the two methods are compatible, that is they have the same relative signature |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public Types()
| Method Detail |
|---|
public static Class getTemplateParameterOfInterface(Class base,
Class desiredInterface)
public static Type getGenericReturnTypeOfGenericInterfaceMethod(Class clazz,
Method method)
interface Foo{
- Parameters:
clazz-method- interface method- Returns:
public static boolean isCompatible(Method method,
Method intfMethod)
method - intfMethod -
public static Method getImplementingMethod(Class clazz,
Method intfMethod)
clazz - intfMethod -
public static Class<?> getRawType(Type type)
public static Class<?> getRawTypeNoException(Type type)
public static Class<?> getTypeArgument(Type genericType)
genericType -
public static Class getCollectionBaseType(Class type,
Type genericType)
public static Class getMapKeyType(Type genericType)
public static Class getMapValueType(Type genericType)
public static Type getActualValueOfTypeVariable(Class<?> clazz,
TypeVariable<?> typeVariable)
clazz - typeVariable -
public static Type[] getActualTypeArgumentsOfAnInterface(Class<?> classToSearch,
Class<?> interfaceToFind)
classToSearch - interfaceToFind -
public static Type[] findParameterizedTypes(Class<?> root,
Class<?> searchedFor)
root - searchedFor -
public static Type[] findClassParameterizedTypes(Class<?> root,
ParameterizedType rootType,
Class<?> searchedForClass)
public static Type[] findInterfaceParameterizedTypes(Class<?> root,
ParameterizedType rootType,
Class<?> searchedForInterface)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||