public class ClassUtils
extends java.lang.Object
Constructor and Description |
---|
ClassUtils() |
Modifier and Type | Method and Description |
---|---|
(package private) static java.util.List<java.lang.Class<?>> |
getAllInterfaces(java.lang.Class<?> cls)
Gets a
List of all interfaces implemented by the given class and its superclasses. |
(package private) static void |
getAllInterfaces(java.lang.Class<?> cls,
java.util.HashSet<java.lang.Class<?>> interfacesFound)
Get the interfaces for the specified class.
|
static java.util.List<java.lang.Class<?>> getAllInterfaces(java.lang.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 inputstatic void getAllInterfaces(java.lang.Class<?> cls, java.util.HashSet<java.lang.Class<?>> interfacesFound)
cls
- the class to look up, may be null
interfacesFound
- the Set
of interfaces for the class