public class Generics extends Object
| Constructor and Description |
|---|
Generics() |
| Modifier and Type | Method and Description |
|---|---|
static Class<?> |
getClass(Type type)
Get the underlying class for a type, or null if the type is a variable type.
|
static <T> List<Class> |
getTypeArguments(Class<T> baseClass,
Class<? extends T> childClass)
Get the actual type arguments a child class has used to extend a generic base class.
|
public static Class<?> getClass(Type type)
type - the typepublic static <T> List<Class> getTypeArguments(Class<T> baseClass, Class<? extends T> childClass)
T - the type of the base classbaseClass - the base classchildClass - the child classCopyright © 2015–2021 Red Hat. All rights reserved.