Class ClassUtils
java.lang.Object
org.assertj.core.util.introspection.ClassUtils
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetAllInterfaces
(Class<?> cls) Gets aList
of all interfaces implemented by the given class and its superclasses.(package private) static void
getAllInterfaces
(Class<?> cls, HashSet<Class<?>> interfacesFound) Get the interfaces for the specified class.getAllSuperclasses
(Class<?> cls) Gets aList
of superclasses for the given class.
-
Constructor Details
-
ClassUtils
public ClassUtils()
-
-
Method Details
-
getAllSuperclasses
Gets a
List
of superclasses for the given class.- Parameters:
cls
- the class to look up, may benull
- Returns:
- the
List
of superclasses in order going up from this onenull
if null input
-
getAllInterfaces
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.
- Parameters:
cls
- the class to look up, may benull
- Returns:
- the
List
of interfaces in order,null
if null input
-
getAllInterfaces
Get the interfaces for the specified class.- Parameters:
cls
- the class to look up, may benull
interfacesFound
- theSet
of interfaces for the class
-