public class Generics
extends java.lang.Object
| Modifier and Type | Method and Description |
|---|---|
static java.lang.Class<?> |
getTypeParameter(java.lang.Class<?> klass)
Finds the type parameter for the given class.
|
static <T> java.lang.Class<T> |
getTypeParameter(java.lang.Class<?> klass,
java.lang.Class<? super T> bound)
Finds the type parameter for the given class which is assignable to the bound class.
|
public static java.lang.Class<?> getTypeParameter(java.lang.Class<?> klass)
klass - a parameterized classpublic static <T> java.lang.Class<T> getTypeParameter(java.lang.Class<?> klass,
java.lang.Class<? super T> bound)
T - the type boundklass - a parameterized classbound - the type bound