org.powermock.classloading
Class DeepCloner

java.lang.Object
  extended by org.powermock.classloading.DeepCloner
All Implemented Interfaces:
DeepClonerSPI

public class DeepCloner
extends Object
implements DeepClonerSPI

The purpose of the deep cloner is to create a deep clone of an object. An object can also be cloned to a different class-loader.


Constructor Summary
DeepCloner()
          Clone using the current ContextClassLoader.
DeepCloner(ClassLoader classLoader)
          Clone using the supplied ClassLoader.
 
Method Summary
<T> T
clone(T objectToClone)
          Clones an object.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DeepCloner

public DeepCloner(ClassLoader classLoader)
Clone using the supplied ClassLoader.


DeepCloner

public DeepCloner()
Clone using the current ContextClassLoader.

Method Detail

clone

public <T> T clone(T objectToClone)
Clones an object.

Specified by:
clone in interface DeepClonerSPI
Returns:
A deep clone of the object to clone.


Copyright © 2007-2010. All Rights Reserved.