public class GenericsUtil
extends java.lang.Object
Constructor and Description |
---|
GenericsUtil() |
Modifier and Type | Method and Description |
---|---|
static java.lang.reflect.Type |
resolveType(java.lang.Class fromClass,
java.lang.Class toClass,
java.lang.reflect.Type type)
Returns the class for the specified type after replacing any type variables using the class hierarchy between the specified
classes.
|
static java.lang.reflect.Type[] |
resolveTypeParameters(java.lang.Class fromClass,
java.lang.Class toClass,
java.lang.reflect.Type type)
Resolves type variables for the type parameters of the specified type by using the class hierarchy between the specified
classes.
|
public static java.lang.reflect.Type resolveType(java.lang.Class fromClass, java.lang.Class toClass, java.lang.reflect.Type type)
toClass
- Must be a sub class of fromClass.public static java.lang.reflect.Type[] resolveTypeParameters(java.lang.Class fromClass, java.lang.Class toClass, java.lang.reflect.Type type)
toClass
- Must be a sub class of fromClass.Copyright © 2019. All Rights Reserved.