public class ClassUtils extends Object
| Modifier and Type | Method and Description |
|---|---|
static Set<Class> |
findAllTypes(Class cls)
Finds all super classes and interfaces for a given class
|
static void |
findAllTypes(Class cls,
Set<Class> types)
Finds all super classes and interfaces for a given class
|
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 Set<Class> findAllTypes(Class cls)
cls - The class to scanpublic static void findAllTypes(Class cls, Set<Class> types)
cls - The class to scantypes - The collected related classes foundpublic static <T> List<Class<?>> getTypeArguments(Class<T> baseClass, Class<? extends T> childClass)
baseClass - the base classchildClass - the child classIllegalArgumentException - If the child class is not the base of the baseClassCopyright © 2014 Atlassian. All rights reserved.