Package weka.core
Class InheritanceUtils
- java.lang.Object
-
- weka.core.InheritanceUtils
-
public class InheritanceUtils extends java.lang.ObjectHelper class for inheritance related operations.- Version:
- $Revision$
- Author:
- FracPete (fracpete at waikato dot ac dot nz)
-
-
Constructor Summary
Constructors Constructor Description InheritanceUtils()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static booleanhasInterface(java.lang.Class<?> intf, java.lang.Class<?> cls)Checks whether the given class implements the given interface.static booleanhasInterface(java.lang.String intf, java.lang.String cls)Checks whether the given class implements the given interface.static booleanisSubclass(java.lang.Class<?> superclass, java.lang.Class<?> otherclass)Checks whether the "otherclass" is a subclass of the given "superclass".static booleanisSubclass(java.lang.String superclass, java.lang.String otherclass)Checks whether the "otherclass" is a subclass of the given "superclass".
-
-
-
Method Detail
-
isSubclass
public static boolean isSubclass(java.lang.String superclass, java.lang.String otherclass)Checks whether the "otherclass" is a subclass of the given "superclass".- Parameters:
superclass- the superclass to check againstotherclass- this class is checked whether it is a subclass of the the superclass- Returns:
- TRUE if "otherclass" is a true subclass
-
isSubclass
public static boolean isSubclass(java.lang.Class<?> superclass, java.lang.Class<?> otherclass)Checks whether the "otherclass" is a subclass of the given "superclass".- Parameters:
superclass- the superclass to check againstotherclass- this class is checked whether it is a subclass of the the superclass- Returns:
- TRUE if "otherclass" is a true subclass
-
hasInterface
public static boolean hasInterface(java.lang.String intf, java.lang.String cls)Checks whether the given class implements the given interface.- Parameters:
intf- the interface to look for in the given classcls- the class to check for the interface- Returns:
- TRUE if the class contains the interface
-
hasInterface
public static boolean hasInterface(java.lang.Class<?> intf, java.lang.Class<?> cls)Checks whether the given class implements the given interface.- Parameters:
intf- the interface to look for in the given classcls- the class to check for the interface- Returns:
- TRUE if the class contains the interface
-
-