Package weka.core

Class InheritanceUtils

java.lang.Object
weka.core.InheritanceUtils

public class InheritanceUtils extends Object
Helper class for inheritance related operations.
Version:
$Revision$
Author:
FracPete (fracpete at waikato dot ac dot nz)
  • Constructor Details

    • InheritanceUtils

      public InheritanceUtils()
  • Method Details

    • isSubclass

      public static boolean isSubclass(String superclass, String otherclass)
      Checks whether the "otherclass" is a subclass of the given "superclass".
      Parameters:
      superclass - the superclass to check against
      otherclass - 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(Class<?> superclass, Class<?> otherclass)
      Checks whether the "otherclass" is a subclass of the given "superclass".
      Parameters:
      superclass - the superclass to check against
      otherclass - 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(String intf, String cls)
      Checks whether the given class implements the given interface.
      Parameters:
      intf - the interface to look for in the given class
      cls - the class to check for the interface
      Returns:
      TRUE if the class contains the interface
    • hasInterface

      public static boolean hasInterface(Class<?> intf, Class<?> cls)
      Checks whether the given class implements the given interface.
      Parameters:
      intf - the interface to look for in the given class
      cls - the class to check for the interface
      Returns:
      TRUE if the class contains the interface