Package com._1c.g5.v8.dt.md.copy
Class ModelObjectCopier.CopyContext
- java.lang.Object
- 
- com._1c.g5.v8.dt.md.copy.ModelObjectCopier.CopyContext
 
- 
- Direct Known Subclasses:
- AttachingModelObjectCopier.SharedCopyContext
 - Enclosing class:
- ModelObjectCopier
 
 public static class ModelObjectCopier.CopyContext extends Object Copy process context that holds information about copied objects, references, external properties names, etc. Context is passed through all copy methods to share state between them.Copy context is stateful and not safe for use by multiple threads. 
- 
- 
Field SummaryFields Modifier and Type Field Description protected List<org.eclipse.xtext.util.Triple<org.eclipse.emf.ecore.EObject,org.eclipse.emf.ecore.EReference,org.eclipse.emf.ecore.EObject>>copiedExternalReferencesprotected Map<org.eclipse.emf.ecore.EObject,org.eclipse.emf.ecore.EObject>copiedExternalResoucesprotected Map<org.eclipse.emf.ecore.EClass,List<String>>copiedNamesprotected List<org.eclipse.xtext.util.Triple<org.eclipse.emf.ecore.EObject,org.eclipse.emf.ecore.EReference,Object>>copiedReferencesprotected Map<org.eclipse.emf.ecore.EObject,org.eclipse.emf.ecore.EObject>copies
 - 
Constructor SummaryConstructors Constructor Description CopyContext()
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddCopy(org.eclipse.emf.ecore.EObject source, org.eclipse.emf.ecore.EObject copy)Add copy to the context.voidaddCreatedName(org.eclipse.emf.ecore.EClass eClass, String name)Add created unique name to the context.voidaddExternalReference(org.eclipse.emf.ecore.EObject toObject, org.eclipse.emf.ecore.EReference toReference, org.eclipse.emf.ecore.EObject externalProperty)Add created external reference to the context.voidaddExternalResource(org.eclipse.emf.ecore.EObject source, org.eclipse.emf.ecore.EObject copy)Add external resource copy objects to the context.voidaddReference(org.eclipse.emf.ecore.EObject toObject, org.eclipse.emf.ecore.EReference toReference, Object value)Add created reference to the context.List<org.eclipse.xtext.util.Triple<org.eclipse.emf.ecore.EObject,org.eclipse.emf.ecore.EReference,org.eclipse.emf.ecore.EObject>>getCopiedExternalReferences()Returns all context copied external references as triples: the external reference owner object.List<org.eclipse.xtext.util.Triple<org.eclipse.emf.ecore.EObject,org.eclipse.emf.ecore.EReference,Object>>getCopiedReferences()Returns all context copied references as triples: the reference owner object.Map<org.eclipse.emf.ecore.EObject,org.eclipse.emf.ecore.EObject>getCopies()Returns map of all context copies: original to its copy.List<String>getCreatedNames(org.eclipse.emf.ecore.EClass eClass)Returns created names for the provided modelEClass.Map<org.eclipse.emf.ecore.EObject,org.eclipse.emf.ecore.EObject>getExternalResources()Returns map of all context object with external resource copies: original to its copy.
 
- 
- 
- 
Field Detail- 
copiesprotected Map<org.eclipse.emf.ecore.EObject,org.eclipse.emf.ecore.EObject> copies 
 - 
copiedExternalResoucesprotected Map<org.eclipse.emf.ecore.EObject,org.eclipse.emf.ecore.EObject> copiedExternalResouces 
 - 
copiedExternalReferencesprotected List<org.eclipse.xtext.util.Triple<org.eclipse.emf.ecore.EObject,org.eclipse.emf.ecore.EReference,org.eclipse.emf.ecore.EObject>> copiedExternalReferences 
 
- 
 - 
Method Detail- 
addCopypublic void addCopy(org.eclipse.emf.ecore.EObject source, org.eclipse.emf.ecore.EObject copy)Add copy to the context.- Parameters:
- source- the source object, cannot be- null
- copy- the copy object, cannot be- null
 
 - 
addCreatedNamepublic void addCreatedName(org.eclipse.emf.ecore.EClass eClass, String name)Add created unique name to the context.- Parameters:
- eClass- the created class, cannot be- null
- name- the created name, cannot be- null
 
 - 
addReferencepublic void addReference(org.eclipse.emf.ecore.EObject toObject, org.eclipse.emf.ecore.EReference toReference, Object value)Add created reference to the context.- Parameters:
- toObject- the reference owner object, cannot be- null
- toReference- the reference feature, cannot be- null
- value- the reference value, must be- EObjector a collection of- EObject, cannot be- null
 
 - 
addExternalReferencepublic void addExternalReference(org.eclipse.emf.ecore.EObject toObject, org.eclipse.emf.ecore.EReference toReference, org.eclipse.emf.ecore.EObject externalProperty)Add created external reference to the context.- Parameters:
- toObject- the external reference owner object, cannot be- null
- toReference- the external reference feature, cannot be- null
- externalProperty- the external reference, cannot be- null
 
 - 
addExternalResourcepublic void addExternalResource(org.eclipse.emf.ecore.EObject source, org.eclipse.emf.ecore.EObject copy)Add external resource copy objects to the context.- Parameters:
- source- the source external resource object, cannot be- null
- copy- the copy external resource object, cannot be- null
 
 - 
getCopiedExternalReferencespublic List<org.eclipse.xtext.util.Triple<org.eclipse.emf.ecore.EObject,org.eclipse.emf.ecore.EReference,org.eclipse.emf.ecore.EObject>> getCopiedExternalReferences() Returns all context copied external references as triples:- the external reference owner object.
- the external reference feature.
- the external reference.
 - Returns:
- all context copied external references, never null
 
 - 
getCopiedReferencespublic List<org.eclipse.xtext.util.Triple<org.eclipse.emf.ecore.EObject,org.eclipse.emf.ecore.EReference,Object>> getCopiedReferences() Returns all context copied references as triples:- the reference owner object.
- the reference feature.
- the reference value, EObjector a collection ofEObject.
 - Returns:
- all context copied external references, never null
 
 - 
getCopiespublic Map<org.eclipse.emf.ecore.EObject,org.eclipse.emf.ecore.EObject> getCopies() Returns map of all context copies: original to its copy.- Returns:
- a map of all context copies: original to its copy, never null
 
 - 
getCreatedNamespublic List<String> getCreatedNames(org.eclipse.emf.ecore.EClass eClass) Returns created names for the provided modelEClass.- Parameters:
- eClass- the created class, cannot be- null
- Returns:
- a list of created names for the provided model EClass, nevernull
 
 - 
getExternalResourcespublic Map<org.eclipse.emf.ecore.EObject,org.eclipse.emf.ecore.EObject> getExternalResources() Returns map of all context object with external resource copies: original to its copy.- Returns:
- a map of all context object with external resource copies: original to its copy, never null
 
 
- 
 
-