Package org.jboss.marshalling.cloner
Interface ObjectCloner
-
public interface ObjectCloner
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
Fields Modifier and Type Field Description static ObjectCloner
IDENTITY
The identity object cloner.
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description Object
clone(Object orig)
Create a deep clone of the given object.void
reset()
Clear the cloner state and any caches.
-
-
-
Field Detail
-
IDENTITY
static final ObjectCloner IDENTITY
The identity object cloner. Always returns the same object it is given.
-
-
Method Detail
-
reset
void reset()
Clear the cloner state and any caches.
-
clone
Object clone(Object orig) throws IOException, ClassNotFoundException
Create a deep clone of the given object.- Parameters:
orig
- the original object- Returns:
- the deep clone
- Throws:
IOException
- if a serialization error occursClassNotFoundException
- if a class cannot be loaded during the cloning process
-
-