public abstract class ClassCopierBase extends Object implements ClassCopier
Modifier | Constructor and Description |
---|---|
protected |
ClassCopierBase(String name)
Pass a name here that can be used for toString, hashCode, and equals.
|
protected |
ClassCopierBase(String name,
boolean isReflective) |
Modifier and Type | Method and Description |
---|---|
Object |
copy(Map<Object,Object> oldToNew,
Object source)
Make the actual copy of source, using oldToNew to preserve aliasing.
|
protected abstract Object |
createCopy(Object source)
Create a copy of source.
|
protected Object |
doCopy(Map<Object,Object> oldToNew,
Object source,
Object result)
Do the copying of data from source to result.
|
boolean |
equals(Object obj) |
int |
hashCode() |
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.
|
String |
toString() |
protected ClassCopierBase(String name)
protected ClassCopierBase(String name, boolean isReflective)
public final Object copy(Map<Object,Object> oldToNew, Object source) throws ReflectiveCopyException
copy
in interface ClassCopier
ReflectiveCopyException
public boolean isReflectiveClassCopier()
ClassCopier
isReflectiveClassCopier
in interface ClassCopier
protected abstract Object createCopy(Object source) throws ReflectiveCopyException
ReflectiveCopyException
protected Object doCopy(Map<Object,Object> oldToNew, Object source, Object result) throws ReflectiveCopyException
ReflectiveCopyException
Copyright © 2017 Oracle. All rights reserved.