Top Description Fields Methods
org.jboss.marshalling.cloner

public Interface ObjectCloner

Known Direct Implementers
org.jboss.marshalling.cloner.SerializingCloner, org.jboss.marshalling.cloner.CloneableCloner
Imports
java.io.IOException

An object cloner. Creates a (possibly deep) clone of an object. Unlike Marshallers and Unmarshallers, ObjectCloners are thread-safe and can be used to clone object graphs concurrently.

Field Summary

Modifier and TypeField and Description
public static final ObjectCloner
IDENTITY

The identity object cloner.

Method Summary

Modifier and TypeMethod and Description
public Object

Returns:

the deep clone
clone
(Object
the original object
orig
)

Create a deep clone of the given object.

public void
reset()

Clear the cloner state and any caches.

Field Detail

IDENTITYback to summary
public static final ObjectCloner IDENTITY

The identity object cloner. Always returns the same object it is given.

Method Detail

cloneback to summary
public Object clone(Object orig) throws IOException, ClassNotFoundException

Create a deep clone of the given object.

Parameters
orig:Object

the original object

Returns:Object

the deep clone

Exceptions
IOException:
if a serialization error occurs
ClassNotFoundException:
if a class cannot be loaded during the cloning process
resetback to summary
public void reset()

Clear the cloner state and any caches.