public final class ReflectionUtils extends Object
| Constructor and Description |
|---|
ReflectionUtils() |
| 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 Class<?>[] |
getInterfacesExtending(Class<?> theClass,
Class<?> theInterface)
Check all interfaces of
theClass that implements
theInterface. |
public static Class<?>[] getInterfacesExtending(Class<?> theClass, Class<?> theInterface)
theClass that implements
theInterface.theClass - the the classtheInterface - the the interfacepublic 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 nullList of interfaces in order, null
if null inputCopyright © 2016 Imatia Innovation S.L.. All rights reserved.