org.unitils.objectvalidation.cloner.UnitilsObjectClonerImpl Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of unitils-objectvalidation Show documentation
Show all versions of unitils-objectvalidation Show documentation
Unitils module to validate objects.
package org.unitils.objectvalidation.cloner;
import org.unitils.mock.core.proxy.CloneUtil;
import org.unitils.objectvalidation.ObjectCloner;
/**
* Deeply clones an object.
* This implementation can be overriden in the construction of a {@link org.unitils.objectvalidation.ObjectValidationRulesCollection}.
*
* @author Matthieu Mestrez
* @since Oct 17, 2013
*/
public class UnitilsObjectClonerImpl implements ObjectCloner {
@Override
public T deepClone(T object) {
/*Cloner cloner = new Cloner();
return cloner.deepClone(object);*/
return CloneUtil.createDeepClone(object);
}
}