Package com.h3xstream.findsecbugs.common
Class InterfaceUtils
- java.lang.Object
-
- com.h3xstream.findsecbugs.common.InterfaceUtils
-
public class InterfaceUtils extends Object
-
-
Constructor Summary
Constructors Constructor Description InterfaceUtils()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static booleanisSubtype(String className, String... superClasses)Test if the given class is a subtype of ONE of the super classes given.static booleanisSubtype(org.apache.bcel.classfile.JavaClass javaClass, String... superClasses)Test if the given class is a subtype of ONE of the super classes given.
-
-
-
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 testsuperClasses- 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 testsuperClasses- If classes extends or implements those classes- Returns:
-
-