org.eclipse.ocl.examples.xtext.base.pivot2cs
Class AliasAnalysis

java.lang.Object
  extended by org.eclipse.emf.common.notify.impl.AdapterImpl
      extended by org.eclipse.ocl.examples.xtext.base.pivot2cs.AliasAnalysis
All Implemented Interfaces:
org.eclipse.emf.common.notify.Adapter, org.eclipse.emf.common.notify.Adapter.Internal

public class AliasAnalysis
extends org.eclipse.emf.common.notify.impl.AdapterImpl

An AliasAnalysis is dynamically created to support the serialization of cross-references following a Pivot to CS conversion. It ensures the resource-wide uniqueness of aliases for package names. Uniqueness is achieved with respect to all names to avoid the complexity of considering which name usages are not actually conflicting.


Nested Class Summary
 
Nested classes/interfaces inherited from interface org.eclipse.emf.common.notify.Adapter
org.eclipse.emf.common.notify.Adapter.Internal
 
Field Summary
protected  MetaModelManager metaModelManager
           
 
Fields inherited from class org.eclipse.emf.common.notify.impl.AdapterImpl
target
 
Constructor Summary
AliasAnalysis(org.eclipse.emf.ecore.resource.Resource resource, MetaModelManager metaModelManager)
           
 
Method Summary
 void dispose()
           
static void dispose(org.eclipse.emf.ecore.resource.Resource resource)
           
static AliasAnalysis getAdapter(org.eclipse.emf.ecore.resource.Resource resource)
           
static AliasAnalysis getAdapter(org.eclipse.emf.ecore.resource.Resource resource, MetaModelManager metaModelManager)
           
 java.lang.String getAlias(org.eclipse.emf.ecore.EObject eObject)
          Deprecated. 
 java.lang.String getAlias(org.eclipse.emf.ecore.EObject eObject, java.lang.String hint)
          Return the alias for eObject, using a non-null hint as a stem for auto-generation, or null if there is none.
 java.lang.Iterable<DomainPackage> getAliases()
          Return the alias for eObject.
protected  java.lang.String getDefaultAlias(java.lang.String name)
           
 java.util.List<PathElement> getPath(Element eObject)
           
 boolean isAdapterForType(java.lang.Object type)
           
 
Methods inherited from class org.eclipse.emf.common.notify.impl.AdapterImpl
getTarget, notifyChanged, setTarget, unsetTarget
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

metaModelManager

@NonNull
protected final MetaModelManager metaModelManager
Constructor Detail

AliasAnalysis

public AliasAnalysis(@NonNull
                     org.eclipse.emf.ecore.resource.Resource resource,
                     @NonNull
                     MetaModelManager metaModelManager)
Method Detail

dispose

public static void dispose(@NonNull
                           org.eclipse.emf.ecore.resource.Resource resource)

getAdapter

@NonNull
public static AliasAnalysis getAdapter(@NonNull
                                               org.eclipse.emf.ecore.resource.Resource resource)

getAdapter

@NonNull
public static AliasAnalysis getAdapter(@NonNull
                                               org.eclipse.emf.ecore.resource.Resource resource,
                                               @NonNull
                                               MetaModelManager metaModelManager)

dispose

public void dispose()

getAlias

@Deprecated
@Nullable
public java.lang.String getAlias(@NonNull
                                                     org.eclipse.emf.ecore.EObject eObject)
Deprecated. 

Return the alias for eObject, or null if there is none.


getAlias

@Nullable
public java.lang.String getAlias(@NonNull
                                          org.eclipse.emf.ecore.EObject eObject,
                                          @Nullable
                                          java.lang.String hint)
Return the alias for eObject, using a non-null hint as a stem for auto-generation, or null if there is none.


getAliases

@NonNull
public java.lang.Iterable<DomainPackage> getAliases()
Return the alias for eObject.


getDefaultAlias

@NonNull
protected java.lang.String getDefaultAlias(@Nullable
                                                   java.lang.String name)

getPath

@NonNull
public java.util.List<PathElement> getPath(@NonNull
                                                   Element eObject)

isAdapterForType

public boolean isAdapterForType(java.lang.Object type)
Specified by:
isAdapterForType in interface org.eclipse.emf.common.notify.Adapter
Overrides:
isAdapterForType in class org.eclipse.emf.common.notify.impl.AdapterImpl