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