/** * Builds a {@link Set} of interfaces from the target class. */ public static Set<Class<?>> getAllInterfaces(final Class<?> target) { assert target != null; Set<Class<?>> ret = new HashSet<Class<?>>(); getAllInteralInterfaces(target, ret); return ret; }
/** * Builds a {@link Set} of interfaces from the target class. */ public static Set<Class<?>> getAllInterfaces(final Class<?> target) { assert target != null; final Set<Class<?>> ret = new HashSet<Class<?>>(); getAllInteralInterfaces(target, ret); return ret; }
/** * Builds a {@link Set} of interfaces from the target class. */ public static Set<Class<?>> getAllInterfaces(final Class<?> target) { assert target != null; final Set<Class<?>> ret = new HashSet<Class<?>>(); getAllInteralInterfaces(target, ret); return ret; }
private static void getAllInteralInterfaces(final Class<?> target, final Set<Class<?>> result) { // quick exit if target is null.. if (target != null) { // get all the interfaces of the target class.. for (Class<?> inter : target.getInterfaces()) { result.add(inter); } // get all the interfaces of the super class.. getAllInteralInterfaces(target.getSuperclass(), result); } }
private static void getAllInteralInterfaces(final Class<?> target, final Set<Class<?>> result) { // quick exit if target is null.. if (target != null) { // get all the interfaces of the target class.. for (Class<?> inter : target.getInterfaces()) { result.add(inter); } // get all the interfaces of the super class.. getAllInteralInterfaces(target.getSuperclass(), result); } }
private static void getAllInteralInterfaces(final Class<?> target, final Set<Class<?>> result) { // quick exit if target is null.. if (target != null) { // get all the interfaces of the target class.. for (Class<?> inter : target.getInterfaces()) { result.add(inter); } // get all the interfaces of the super class.. getAllInteralInterfaces(target.getSuperclass(), result); } }