private static void addSuperInterfacesToSet(Class type, Set set) { Class[] ifaces = type.getInterfaces(); for (int i = 0, len = ifaces.length; i < len; ++i) { set.add( ifaces[i] ); addSuperInterfacesToSet( ifaces[i], set ); } }
private static void addSuperInterfacesToSet(Class type, Set set) { Class[] ifaces = type.getInterfaces(); for (int i = 0, len = ifaces.length; i < len; ++i) { set.add( ifaces[i] ); addSuperInterfacesToSet( ifaces[i], set ); } }
public static Set allAssignableFrom(Class type) { Set out = new HashSet(); //type itself and superclasses (if any) for (Class cl = type; cl != null; cl = cl.getSuperclass()) out.add( cl ); //super interfaces (if any) addSuperInterfacesToSet( type, out ); return out; }
private static void addSuperInterfacesToSet(Class type, Set set) { Class[] ifaces = type.getInterfaces(); for (int i = 0, len = ifaces.length; i < len; ++i) { set.add( ifaces[i] ); addSuperInterfacesToSet( ifaces[i], set ); } }
public static Set allAssignableFrom(Class type) { Set out = new HashSet(); //type itself and superclasses (if any) for (Class cl = type; cl != null; cl = cl.getSuperclass()) out.add( cl ); //super interfaces (if any) addSuperInterfacesToSet( type, out ); return out; }
public static Set allAssignableFrom(Class type) { Set out = new HashSet(); //type itself and superclasses (if any) for (Class cl = type; cl != null; cl = cl.getSuperclass()) out.add( cl ); //super interfaces (if any) addSuperInterfacesToSet( type, out ); return out; }