/** * Adds the class which this class extends (if there is one) to the list of interfaces * @see #getInterfacesForClass(Class) * @param type any class type * @return the list of interfaces and the class this extends (empty if none) */ public static List<Class<?>> getExtendAndInterfacesForClass(Class<?> type) { ArrayList<Class<?>> l = new ArrayList<Class<?>>(); Class<?> superClass = type.getSuperclass(); if (superClass != null) { l.add(superClass); } l.addAll( getInterfacesForClass(type) ); return l; }
/** * Adds the class which this class extends (if there is one) to the list of interfaces * @see #getInterfacesForClass(Class) * @param type any class type * @return the list of interfaces and the class this extends (empty if none) */ public static List<Class<?>> getExtendAndInterfacesForClass(Class<?> type) { ArrayList<Class<?>> l = new ArrayList<Class<?>>(); Class<?> superClass = type.getSuperclass(); if (superClass != null) { l.add(superClass); } l.addAll( getInterfacesForClass(type) ); return l; }
if (Collections.class.equals(parent)) { List<Class<?>> l = getInterfacesForClass(type); if (l.size() > 0) { for (Class<?> iface : l) {
if (Collections.class.equals(parent)) { List<Class<?>> l = getInterfacesForClass(type); if (l.size() > 0) { for (Class<?> iface : l) {