Class Types
java.lang.Object
org.jboss.resteasy.reactive.common.util.types.Types
Type conversions and generic type manipulations
- Version:
- $Revision: 1 $
- Author:
- Bill Burke
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic 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
getEffectiveReturnType
(Type returnType) static Type
getMultipartElementType
(Type paramType) static Class<?>
getRawType
(Type type)
-
Constructor Details
-
Types
public Types()
-
-
Method Details
-
getActualTypeArgumentsOfAnInterface
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.- Parameters:
classToSearch
- classinterfaceToFind
- interface to find- Returns:
- type arguments of the interface
-
findParameterizedTypes
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.- Parameters:
root
- root classsearchedFor
- searched class- Returns:
- for generic class/interface returns array of real types
-
findClassParameterizedTypes
public static Type[] findClassParameterizedTypes(Class<?> root, ParameterizedType rootType, Class<?> searchedForClass) -
findInterfaceParameterizedTypes
public static Type[] findInterfaceParameterizedTypes(Class<?> root, ParameterizedType rootType, Class<?> searchedForInterface) -
getEffectiveReturnType
-
getMultipartElementType
-
getRawType
-