@Test public void testIsSuperOfStaticMethod() { failFalse(ClassSet.isSuperOf(SomeBase.class, SubSubSomeBase.class)); failFalse(ClassSet.isSuperOf(Object.class, SubSubSomeBase.class)); failFalse(ClassSet.isSuperOf(SubSomeBase.class, SubSubSomeBase.class)); failTrue(ClassSet.isSuperOf(SomeBase.class, Object.class)); failTrue(ClassSet.isSuperOf(SubSubSomeBase.class, SomeBase.class)); }
public static boolean isSuperOf(Class expectedParent, Class expectedChild) { if (expectedParent.equals(expectedChild)) { return false; } return expectedParent.isAssignableFrom(expectedChild); }
ClassSet extends HashSet<Class> { public static boolean isSuperOf(Class expectedParent, Class expectedChild) { if (expectedParent.equals(expectedChild)) { return false; } return expectedParent.isAssignableFrom(expectedChild); } }
ClassSet extends HashSet<Class> { public static boolean isSuperOf(Class expectedParent, Class expectedChild) { if (expectedParent.equals(expectedChild)) { return false; } return expectedParent.isAssignableFrom(expectedChild); } ClassSet(int initialCapacity);  ClassSet(int initialCapacity, float loadFactor);  ClassSet(Collection c);  ClassSet(Class... c);  ClassSet(); }
ClassSet extends HashSet<Class> { public static boolean isSuperOf(Class expectedParent, Class expectedChild) { if (expectedParent.equals(expectedChild)) { return false; } return expectedParent.isAssignableFrom(expectedChild); } ClassSet(int initialCapacity);  ClassSet(int initialCapacity, float loadFactor);  ClassSet(Collection c);  ClassSet(Class... c);  ClassSet(); ClassSet getSupersOf(Class queryClass); ClassSet getExtendersOf(Class queryClass); boolean hasSupersOf(Class queryClass); @Override String toString(); static boolean isSuperOf(Class expectedParent, Class expectedChild); static ClassSet fromInstances(Collection<Object> objs); List<String> classNames(); }
ClassSet extends HashSet<Class> { public static boolean isSuperOf(Class expectedParent, Class expectedChild) { if (expectedParent.equals(expectedChild)) { return false; } return expectedParent.isAssignableFrom(expectedChild); } ClassSet(int initialCapacity);  ClassSet(int initialCapacity, float loadFactor);  ClassSet(Collection c);  ClassSet(Class... c);  ClassSet(); ClassSet getSupersOf(Class queryClass); ClassSet getExtendersOf(Class queryClass); boolean hasSupersOf(Class queryClass); @Override String toString(); static boolean isSuperOf(Class expectedParent, Class expectedChild); static ClassSet fromInstances(Collection<Object> objs); List<String> classNames();  }