/** * Checks if the given AnnotatedType is sensible, otherwise provides warnings. */ private static void checkSensibility(AnnotatedType<?> type) { // check if it has a constructor if (type.getConstructors().isEmpty() && !type.getJavaClass().isInterface()) { MetadataLogger.LOG.noConstructor(type); } Set<Class<?>> hierarchy = new HashSet<Class<?>>(); for (Class<?> clazz = type.getJavaClass(); clazz != null; clazz = clazz.getSuperclass()) { hierarchy.add(clazz); hierarchy.addAll(Reflections.getInterfaceClosure(clazz)); } checkMembersBelongToHierarchy(type.getConstructors(), hierarchy, type); checkMembersBelongToHierarchy(type.getMethods(), hierarchy, type); checkMembersBelongToHierarchy(type.getFields(), hierarchy, type); }
/** * Checks if the given AnnotatedType is sensible, otherwise provides warnings. */ private static void checkSensibility(AnnotatedType<?> type) { // check if it has a constructor if (type.getConstructors().isEmpty() && !type.getJavaClass().isInterface()) { MetadataLogger.LOG.noConstructor(type); } Set<Class<?>> hierarchy = new HashSet<Class<?>>(); for (Class<?> clazz = type.getJavaClass(); clazz != null; clazz = clazz.getSuperclass()) { hierarchy.add(clazz); hierarchy.addAll(Reflections.getInterfaceClosure(clazz)); } checkMembersBelongToHierarchy(type.getConstructors(), hierarchy, type); checkMembersBelongToHierarchy(type.getMethods(), hierarchy, type); checkMembersBelongToHierarchy(type.getFields(), hierarchy, type); }
/** * Checks if the given AnnotatedType is sensible, otherwise provides warnings. */ private static void checkSensibility(AnnotatedType<?> type) { // check if it has a constructor if (type.getConstructors().isEmpty() && !type.getJavaClass().isInterface()) { MetadataLogger.LOG.noConstructor(type); } Set<Class<?>> hierarchy = new HashSet<Class<?>>(); for (Class<?> clazz = type.getJavaClass(); clazz != null; clazz = clazz.getSuperclass()) { hierarchy.add(clazz); hierarchy.addAll(Reflections.getInterfaceClosure(clazz)); } checkMembersBelongToHierarchy(type.getConstructors(), hierarchy, type); checkMembersBelongToHierarchy(type.getMethods(), hierarchy, type); checkMembersBelongToHierarchy(type.getFields(), hierarchy, type); }
/** * Checks if the given AnnotatedType is sensible, otherwise provides warnings. */ private static void checkSensibility(AnnotatedType<?> type) { // check if it has a constructor if (type.getConstructors().isEmpty() && !type.getJavaClass().isInterface()) { MetadataLogger.LOG.noConstructor(type); } Set<Class<?>> hierarchy = new HashSet<Class<?>>(); for (Class<?> clazz = type.getJavaClass(); clazz != null; clazz = clazz.getSuperclass()) { hierarchy.add(clazz); hierarchy.addAll(Reflections.getInterfaceClosure(clazz)); } checkMembersBelongToHierarchy(type.getConstructors(), hierarchy, type); checkMembersBelongToHierarchy(type.getMethods(), hierarchy, type); checkMembersBelongToHierarchy(type.getFields(), hierarchy, type); }
/** * Checks if the given AnnotatedType is sensible, otherwise provides warnings. */ private static void checkSensibility(AnnotatedType<?> type) { // check if it has a constructor if (type.getConstructors().isEmpty() && !type.getJavaClass().isInterface()) { MetadataLogger.LOG.noConstructor(type); } Set<Class<?>> hierarchy = new HashSet<Class<?>>(); for (Class<?> clazz = type.getJavaClass(); clazz != null; clazz = clazz.getSuperclass()) { hierarchy.add(clazz); hierarchy.addAll(Reflections.getInterfaceClosure(clazz)); } checkMembersBelongToHierarchy(type.getConstructors(), hierarchy, type); checkMembersBelongToHierarchy(type.getMethods(), hierarchy, type); checkMembersBelongToHierarchy(type.getFields(), hierarchy, type); }
/** * Checks if the given AnnotatedType is sensible, otherwise provides warnings. */ private static void checkSensibility(AnnotatedType<?> type) { // check if it has a constructor if (type.getConstructors().isEmpty() && !type.getJavaClass().isInterface()) { MetadataLogger.LOG.noConstructor(type); } Set<Class<?>> hierarchy = new HashSet<Class<?>>(); for (Class<?> clazz = type.getJavaClass(); clazz != null; clazz = clazz.getSuperclass()) { hierarchy.add(clazz); hierarchy.addAll(Reflections.getInterfaceClosure(clazz)); } checkMembersBelongToHierarchy(type.getConstructors(), hierarchy, type); checkMembersBelongToHierarchy(type.getMethods(), hierarchy, type); checkMembersBelongToHierarchy(type.getFields(), hierarchy, type); }