org.eclipse.ocl.examples.pivot.utilities
Class ASSaver
java.lang.Object
org.eclipse.ocl.examples.pivot.utilities.ASSaver
public class ASSaver
- extends java.lang.Object
ASSaver ensures that all references to synthesized types are terminated
by local copies of the synthesized types.
Field Summary |
protected org.eclipse.emf.ecore.resource.Resource |
resource
|
Constructor Summary |
ASSaver(org.eclipse.emf.ecore.resource.Resource resource)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
resource
@NonNull
protected final org.eclipse.emf.ecore.resource.Resource resource
ASSaver
public ASSaver(@NonNull
org.eclipse.emf.ecore.resource.Resource resource)
addSpecializingElement
public void addSpecializingElement(@NonNull
Element object)
addSpecializingElement
public boolean addSpecializingElement(@NonNull
Element object,
@NonNull
Operation referredOperation)
addSpecializingElement
public boolean addSpecializingElement(@NonNull
Element object,
@NonNull
Type referredType)
getLocateVisitor
@NonNull
protected ASSaverLocateVisitor getLocateVisitor(@NonNull
org.eclipse.emf.ecore.EObject eObject)
getNormalizeVisitor
@NonNull
protected ASSaverNormalizeVisitor getNormalizeVisitor(@NonNull
org.eclipse.emf.ecore.EObject eObject)
getOrphanClass
@NonNull
protected Type getOrphanClass(@NonNull
Package orphanagePackage)
getOrphanPackage
@NonNull
protected Package getOrphanPackage(@NonNull
org.eclipse.emf.ecore.resource.Resource resource)
getResolveVisitor
@NonNull
protected ASSaverResolveVisitor getResolveVisitor(@NonNull
org.eclipse.emf.ecore.EObject eObject)
isOrphanOperation
protected boolean isOrphanOperation(@NonNull
Operation operation)
localizeSpecializations
public void localizeSpecializations()
- Prepare a pivot resource for save by redirecting all type references to
specializations to local copies of the specializations.
loadOrphanage
protected void loadOrphanage(@NonNull
org.eclipse.emf.ecore.resource.Resource resource)
locateSpecializations
protected void locateSpecializations(java.util.List<? extends org.eclipse.emf.ecore.EObject> eObjects)
normalizeContents
public void normalizeContents()
resolveOperation
@NonNull
public <T extends Operation> T resolveOperation(@NonNull
T referredOperation)
- Return the resolved variant of referredType, which may require creation
of a local copy of a specialization.
resolveType
@NonNull
public <T extends Type> T resolveType(@NonNull
T referredType)
- Return the resolved variant of referredType, which may require creation
of a local copy of a specialization.