/** * Retrieves all super types of the given class type. Super types are all * types the given class extends or implements. The given class type is also * included in the set. The iteration order of the set has to be from most * concrete to most general. * * @param clazz The class from which the super types should be retrieved * @return The super types of the given class */ public static Set<Class<?>> getSuperTypes(Class<?> clazz) { return getSuperTypes(clazz, Object.class); }
private List<Method> getBridgeSetters(Class<?> clazz, MethodAttribute<?, ?> attribute, Method setter) { List<Method> bridges = new ArrayList<Method>(); String name = setter.getName(); Class<?> attributeType = attribute.getConvertedJavaType(); for (Class<?> c : ReflectionUtils.getSuperTypes(clazz)) { METHOD: for (Method m : c.getMethods()) { if (name.equals(m.getName()) && m.getParameterTypes()[0].isAssignableFrom(attributeType) && !attributeType.equals(m.getParameterTypes()[0])) { for (Method b : bridges) { if (b.getParameterTypes()[0].equals(m.getParameterTypes()[0])) { continue METHOD; } } bridges.add(m); } } } return bridges; }
private List<Method> getBridgeGetters(Class<?> clazz, MethodAttribute<?, ?> attribute, Method getter) { List<Method> bridges = new ArrayList<Method>(); String name = getter.getName(); Class<?> attributeType = attribute.getConvertedJavaType(); for (Class<?> c : ReflectionUtils.getSuperTypes(clazz)) { METHOD: for (Method m : c.getMethods()) { if (name.equals(m.getName()) && m.getReturnType().isAssignableFrom(attributeType) && !attributeType.equals(m.getReturnType())) { for (Method b : bridges) { if (b.getReturnType().equals(m.getReturnType())) { continue METHOD; } } bridges.add(m); } } } return bridges; }
Set<Class<?>> superTypes = ReflectionUtils.getSuperTypes(clazz); for (Class<?> type : superTypes) { annotation = type.getAnnotation(annotationClazz);
for (Class<?> type : ReflectionUtils.getSuperTypes(clazz)) { Annotation[] annotations = type.getAnnotations();
Set<Class<?>> superTypes = getSuperTypes(concreteClass, classThatContainsTypeVariable); List<Class<?>> classStack = new ArrayList<>(superTypes.size()); Type resolvedType = typeVariable;
for (Class<?> c : ReflectionUtils.getSuperTypes(entityViewClass)) { for (Method method : c.getDeclaredMethods()) { if (!Modifier.isPrivate(method.getModifiers()) && Modifier.isAbstract(method.getModifiers()) && !method.isBridge()) {