public class Copier
extends EcoreUtil.Copier
content trees;
the map is from EObject to EObject, i.e., from original to copy;
use EcoreUtil.copy or EcoreUtil.copyAll to do routine copies.
Since this implementation extends a Map implementation, it acts as the result of the over all copy.
The client can call copy and copyAll repeatedly.
When all the objects have been copied,
the client should call copyReferences
to copy the appropriate cross references.
Copier copier = new Copier(); EObject result = copier.copy(eObject); Collection results = copier.copyAll(eObjects); copier.copyReferences();The copier delegates to
copyContainment, copyAttribute during the copy phase
and to copyReference, during the cross reference phase.
This allows tailored handling through derivation.| Constructor and Description |
|---|
Copier(EObject target)
Constructor with target of the copy
|
Copier(EObject target,
java.util.List<EStructuralFeature> omitCopyFeatures)
Constructor with target and a list of features that won't be overwritten
|
| Modifier and Type | Method and Description |
|---|---|
EObject |
copy(EObject eObject)
Returns a copy of the given eObject.
|
protected EObject |
createCopy(EObject eObject) |
public Copier(EObject target)
target - the target to copy the content intopublic Copier(EObject target,
java.util.List<EStructuralFeature> omitCopyFeatures)
target - the target to copy the content intoomitCopyFeatures - the features that will not be overwritten in the targetData In Motion Consulting