private void expandSupertypes(Multimap<String, String> mmap, String key, Class<?> type) { for (Class<?> supertype : ReflectionUtils.getSuperTypes(type)) { if (mmap.put(supertype.getName(), key)) { if (log != null) log.debug("expanded subtype {} -> {}", supertype.getName(), key); expandSupertypes(mmap, supertype.getName(), supertype); } } }
private void expandSupertypes(Multimap<String, String> mmap, String key, Class<?> type) { for (Class<?> supertype : ReflectionUtils.getSuperTypes(type)) { if (mmap.put(supertype.getName(), key)) { if (log != null) log.debug("expanded subtype {} -> {}", supertype.getName(), key); expandSupertypes(mmap, supertype.getName(), supertype); } } }
/** get all super types of given {@code type}, including, optionally filtered by {@code predicates} * <p> include {@code Object.class} if {@link #includeObject} is true */ public static Set<Class<?>> getAllSuperTypes(final Class<?> type, Predicate<? super Class<?>>... predicates) { Set<Class<?>> result = Sets.newLinkedHashSet(); if (type != null && (includeObject || !type.equals(Object.class))) { result.add(type); for (Class<?> supertype : getSuperTypes(type)) { result.addAll(getAllSuperTypes(supertype)); } } return filter(result, predicates); }
/** get all super types of given {@code type}, including, optionally filtered by {@code predicates} * <p> include {@code Object.class} if {@link #includeObject} is true */ public static Set<Class<?>> getAllSuperTypes(final Class<?> type, Predicate<? super Class<?>>... predicates) { Set<Class<?>> result = Sets.newLinkedHashSet(); if (type != null && (includeObject || !type.equals(Object.class))) { result.add(type); for (Class<?> supertype : getSuperTypes(type)) { result.addAll(getAllSuperTypes(supertype)); } } return filter(result, predicates); }
private void expandSupertypes(Multimap<String, String> mmap, String key, Class<?> type) { for (Class<?> supertype : ReflectionUtils.getSuperTypes(type)) { if (mmap.put(supertype.getName(), key)) { if (log != null) log.debug("expanded subtype {} -> {}", supertype.getName(), key); expandSupertypes(mmap, supertype.getName(), supertype); } } }
/** get all super types of given {@code type}, including, optionally filtered by {@code predicates} * <p> include {@code Object.class} if {@link #includeObject} is true */ public static Set<Class<?>> getAllSuperTypes(final Class<?> type, Predicate<? super Class<?>>... predicates) { Set<Class<?>> result = Sets.newLinkedHashSet(); if (type != null && (includeObject || !type.equals(Object.class))) { result.add(type); for (Class<?> supertype : getSuperTypes(type)) { result.addAll(getAllSuperTypes(supertype)); } } return filter(result, predicates); }
public static Set<Class<?>> getAllSuperTypes(final Class<?> type , Predicate<Class<?>>... predicates) { Set<Class<?>> result = new LinkedHashSet(); if (type != null && (includeObject || ! type.equals(Object.class))) { result.add(type); for (Class<?> supertype : getSuperTypes(type)) { result.addAll(getAllSuperTypes(supertype)); } } return filter(result , predicates); }
private void expandSupertypes(Multimap<String, String> mmap , String key , Class<?> type) { for (Class<?> supertype : ReflectionUtils.getSuperTypes(type)) { if (mmap.put(supertype.getName() , key)) { if (LOGGER != null) LOGGER.fine("expanded subtype {} -> {} " + supertype.getName() + " - " + key); expandSupertypes(mmap , supertype.getName() , supertype); } } }