Package org.jboss.marshalling.cloner
Interface ObjectCloner
-
- All Known Implementing Classes:
CloneableCloner,SerializingCloner
public interface ObjectClonerAn 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 ObjectClonerIDENTITYThe identity object cloner.
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description java.lang.Objectclone(java.lang.Object orig)Create a deep clone of the given object.voidreset()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
java.lang.Object clone(java.lang.Object orig) throws java.io.IOException, java.lang.ClassNotFoundExceptionCreate a deep clone of the given object.- Parameters:
orig- the original object- Returns:
- the deep clone
- Throws:
java.io.IOException- if a serialization error occursjava.lang.ClassNotFoundException- if a class cannot be loaded during the cloning process
-
-