- All Implemented Interfaces:
Copier
public class MultiStrategyCopier
extends Object
implements Copier
Copier that copies an object trying a variety of strategies until one succeeds.
The strategies that will be attempted in order are:
- Serialization
- Cloning
- Copy constructor
- New instance
- Since:
- 2.3
- Author:
- Arjan Tijms
-
Constructor Summary 
Constructors
-
Method Summary 
Return an object that's logically a copy of the given object.
Methods inherited from class java.lang.Object 
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Constructor Details 
-
MultiStrategyCopier 
public MultiStrategyCopier()
-
Method Details 
-
copy 
Description copied from interface: Copier
Return an object that's logically a copy of the given object.
- Specified by:
copy
in interface Copier
- Parameters:
object
- the object to be copied
- Returns:
- a copy of the given object