Class Types
- java.lang.Object
-
- org.jboss.resteasy.reactive.common.util.types.Types
-
public final class Types extends Object
Type conversions and generic type manipulations- Version:
- $Revision: 1 $
- Author:
- Bill Burke
-
-
Constructor Summary
Constructors Constructor Description Types()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description 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
getEffectiveReturnType(Type returnType)
static Type
getMultipartElementType(Type paramType)
static Class<?>
getRawType(Type type)
-
-
-
Method Detail
-
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
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.- 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)
-
-