org.unitils.objectvalidation.cloner.ObjectClonerImpl 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.objectvalidation.ObjectCloner;
import com.rits.cloning.Cloner;
/**
* Deeply clones an object.
*
* @author Matthieu Mestrez
* @since Oct 17, 2013
*/
public class ObjectClonerImpl implements ObjectCloner {
@Override
public T deepClone(T object) {
Cloner cloner = new Cloner();
return cloner.deepClone(object);
}
}