public class InheritanceUtils extends Object
| Constructor and Description |
|---|
InheritanceUtils() |
| Modifier and Type | Method and Description |
|---|---|
static boolean |
hasInterface(Class<?> intf,
Class<?> cls)
Checks whether the given class implements the given interface.
|
static boolean |
hasInterface(String intf,
String cls)
Checks whether the given class implements the given interface.
|
static boolean |
isSubclass(Class<?> superclass,
Class<?> otherclass)
Checks whether the "otherclass" is a subclass of the given "superclass".
|
static boolean |
isSubclass(String superclass,
String otherclass)
Checks whether the "otherclass" is a subclass of the given "superclass".
|
public static boolean isSubclass(String superclass, String otherclass)
superclass - the superclass to check againstotherclass - this class is checked whether it is a subclass of the the
superclasspublic static boolean isSubclass(Class<?> superclass, Class<?> otherclass)
superclass - the superclass to check againstotherclass - this class is checked whether it is a subclass of the the
superclasspublic static boolean hasInterface(String intf, String cls)
intf - the interface to look for in the given classcls - the class to check for the interfaceCopyright © 2020 University of Waikato, Hamilton, NZ. All rights reserved.