/** * Entry-point into the deep-copy functionality. * * @param from an Object instance, never null. * @param to a presumably-empty Resource instance. */ protected void copyProperties(Object from, Resource to) { copyProperties0(from.getClass(), from, to); }
Field[] fields = getDeclaredFields(type); if (isIncluded(f)) addProperty(to, f, value); copyProperties0(type.getSuperclass(), from, to);