Class ObjectCopierImpl
- java.lang.Object
-
- org.glassfish.pfl.dynamic.copyobject.impl.ObjectCopierImpl
-
- All Implemented Interfaces:
ObjectCopier
public class ObjectCopierImpl extends java.lang.Object implements ObjectCopier
Class used to deep copy arbitrary data. A single ObjectCopierImpl instance will preserve all object aliasing across multiple calls to copy.
-
-
Field Summary
Fields Modifier and Type Field Description private static PipelineClassCopierFactory
ccf
private java.util.Map<java.lang.Object,java.lang.Object>
oldToNew
-
Constructor Summary
Constructors Constructor Description ObjectCopierImpl()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.Object
copy(java.lang.Object obj)
Return a deep copy of obj.
-
-
-
Field Detail
-
ccf
private static PipelineClassCopierFactory ccf
-
oldToNew
private java.util.Map<java.lang.Object,java.lang.Object> oldToNew
-
-
Method Detail
-
copy
public java.lang.Object copy(java.lang.Object obj) throws ReflectiveCopyException
Return a deep copy of obj. Aliasing is preserved within obj and between objects passed in multiple calls to the same instance of ReflectObjectCopierImpl.- Specified by:
copy
in interfaceObjectCopier
- Throws:
ReflectiveCopyException
-
-