public class ClassUtils extends Object
Constructor and Description |
---|
ClassUtils() |
Modifier and Type | Method and Description |
---|---|
static List<Class<?>> |
getAllInterfaces(Class<?> cls)
Gets a
List of all interfaces implemented by the given class and its superclasses. |
static List<Class<?>> |
getAllSuperclasses(Class<?> cls)
Gets a
List of superclasses for the given class. |
public static List<Class<?>> getAllSuperclasses(Class<?> cls)
Gets a List
of superclasses for the given class.
cls
- the class to look up, may be null
List
of superclasses in order going up from this one
null
if null inputpublic static List<Class<?>> getAllInterfaces(Class<?> cls)
Gets a List
of all interfaces implemented by the given class and its superclasses.
The order is determined by looking through each interface in turn as declared in the source file and following its hierarchy up. Then each superclass is considered in the same way. Later duplicates are ignored, so the order is maintained.
cls
- the class to look up, may be null
List
of interfaces in order, null
if null inputCopyright © 2014–2019 AssertJ. All rights reserved.