Class InterfaceUtils


  • public class InterfaceUtils
    extends Object
    • Constructor Detail

      • InterfaceUtils

        public InterfaceUtils()
    • Method Detail

      • isSubtype

        public static boolean isSubtype​(org.apache.bcel.classfile.JavaClass javaClass,
                                        String... superClasses)
        Test if the given class is a subtype of ONE of the super classes given.
        The following test that the class is a subclass of Hashtable.
         boolean isHashtable = InterfaceUtils.isSubtype( classThatCouldBeAHashTable, "java.util.Hashtable");
         
        Parameters:
        javaClass - Class to test
        superClasses - If classes extends or implements those classes
        Returns:
      • isSubtype

        public static boolean isSubtype​(String className,
                                        String... superClasses)
        Test if the given class is a subtype of ONE of the super classes given.
        The following test that the class is a subclass of Hashtable.
         boolean isHashtable = InterfaceUtils.isSubtype( classThatCouldBeAHashTable, "java.util.Hashtable");
         
        Parameters:
        className - Class to test
        superClasses - If classes extends or implements those classes
        Returns: