Package weka.core
Class InheritanceUtils
java.lang.Object
weka.core.InheritanceUtils
Helper class for inheritance related operations.
- Version:
- $Revision$
- Author:
- FracPete (fracpete at waikato dot ac dot nz)
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic 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".
-
Constructor Details
-
InheritanceUtils
public InheritanceUtils()
-
-
Method Details
-
isSubclass
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
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
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
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
-