Interface ClassCopier
-
- All Known Implementing Classes:
ClassCopierBase,ClassCopierOrdinaryImpl
public interface ClassCopierProvides deep copying of one specific class. An ObjectCopier (what Util.copyObject sees) uses some kind of factory to find the ClassCopier for the Class of the object in order to copy a particular object.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description java.lang.Objectcopy(java.util.Map<java.lang.Object,java.lang.Object> oldToNew, java.lang.Object source)Produce a deep copy of source, recursively copying all of its constituents.booleanisReflectiveClassCopier()We need to know whether this class copier operates via reflection or not, as the reflective class copier must be able to tell when a super class is copied by an incompatible copier.
-
-
-
Method Detail
-
copy
java.lang.Object copy(java.util.Map<java.lang.Object,java.lang.Object> oldToNew, java.lang.Object source) throws ReflectiveCopyExceptionProduce a deep copy of source, recursively copying all of its constituents. Aliasing is preserved through oldToNew, so that no component of source is copied more than once. Throws ReflectiveCopyException if it cannot copy source. This may occur in some implementations, depending on the mechanism used to copy the class.- Throws:
ReflectiveCopyException
-
isReflectiveClassCopier
boolean isReflectiveClassCopier()
We need to know whether this class copier operates via reflection or not, as the reflective class copier must be able to tell when a super class is copied by an incompatible copier.
-
-