public M cloneTo(M toInstance) {
		Field forDisplay = null;
		try {
			Field[] fields = getClass().getDeclaredFields();
			// Iterate over all the attributes
			for (Field each : fields) {
				if (each.isSynthetic()) {
					continue;
				}
				final int modifiers = each.getModifiers();
				if (Modifier.isFinal(modifiers) || Modifier.isStatic(modifiers)) {
					continue;
				}
				forDisplay = each;
				final Cloneable annotation = each.getAnnotation(Cloneable.class);
				if (annotation == null) {
					continue;
				}
				if (!each.isAccessible()) {
					each.setAccessible(true);
				}
				each.set(toInstance, each.get(this));
			}
			return toInstance;
		} catch (Exception e) {
			String displayName = (forDisplay == null) ? "Empty" : forDisplay.getName();
			throw processException(displayName + " - Exception occurred while cloning an entity from " + this + " to "
					+ toInstance, e);
		}
	}
Clone current entity.

Only not null value is merged.

@param toInstance instance to which the value is copied.
@return cloned entity
ngrinder-core/src/main/java/org/ngrinder/model/BaseEntity.java