org.clazzes.util.reflect.impl
Class POJOCloner<T>

java.lang.Object
  extended by org.clazzes.util.reflect.impl.POJOCloner<T>
All Implemented Interfaces:
Cloner<T>

public class POJOCloner<T>
extends java.lang.Object
implements Cloner<T>

A field by field cloner for POJOs.

Author:
wglas

Constructor Summary
POJOCloner(java.lang.Class<T> clazz)
           
 
Method Summary
 T clone(T o)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

POJOCloner

public POJOCloner(java.lang.Class<T> clazz)
Method Detail

clone

public T clone(T o)
        throws java.lang.CloneNotSupportedException
Specified by:
clone in interface Cloner<T>
Parameters:
o - A POJO object to clone.
Returns:
A clone of the given object.
Throws:
java.lang.CloneNotSupportedException - If this instance cannot be cloned.


Copyright © 2010. All Rights Reserved.