org.eclipse.gmt.umlx.ecore2.util
Class EReferenceE2AssociationAdapter
java.lang.Object
org.eclipse.gmt.umlx.ecore.AbstractAdapter
org.eclipse.gmt.umlx.ecore.ModelChangeAdapter
org.eclipse.gmt.umlx.ecore2.util.EReferenceE2AssociationAdapter
- All Implemented Interfaces:
- org.eclipse.emf.common.notify.Adapter, IModelChangeListener
public class EReferenceE2AssociationAdapter
- extends ModelChangeAdapter
- implements IModelChangeListener
An EReferenceE2AssociationAdapter instance maintains the E2Association link
from an EReference to an EClass. The maintenance is independently lazy at
each end of a bi-directional relationship.
An E2Association always references two EReference instances,
one of which may be inactive in the case of a unidirectional relationship. These
references are immutable. A new E2Association must be created for a changed context.
The adapter maintains the property that there is at most one active E2Association per
active EReference (and its EOpposite) where active indicates that eResource() is non-null.
Nested classes/interfaces inherited from interface org.eclipse.emf.common.notify.Adapter |
org.eclipse.emf.common.notify.Adapter.Internal |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
addAssociation
public static void addAssociation(org.eclipse.emf.ecore.EReference reference,
E2Association association)
basicGetAdapter
public static EReferenceE2AssociationAdapter basicGetAdapter(org.eclipse.emf.ecore.EReference eReference)
getAdapter
public static EReferenceE2AssociationAdapter getAdapter(org.eclipse.emf.ecore.EReference eReference)
getAssociation
public static E2Association getAssociation(E2AssociationLinkEnd sourceLinkEnd,
E2AssociationLinkEnd targetLinkEnd)
- Return the association between sourceLinkEnd and targetLinkEnd.
- Parameters:
sourceLinkEnd
- targetLinkEnd
-
- Returns:
removeAssociation
public static void removeAssociation(org.eclipse.emf.ecore.EReference reference,
E2Association association)
isAdapterForType
public boolean isAdapterForType(java.lang.Object type)
- Specified by:
isAdapterForType
in interface org.eclipse.emf.common.notify.Adapter
modelChanged
public void modelChanged(org.eclipse.emf.common.notify.Notification notification)
- Specified by:
modelChanged
in interface IModelChangeListener
notifyChanged
public void notifyChanged(org.eclipse.emf.common.notify.Notification notification)
- Specified by:
notifyChanged
in interface org.eclipse.emf.common.notify.Adapter
- Overrides:
notifyChanged
in class AbstractAdapter
toString
public java.lang.String toString()
- Overrides:
toString
in class AbstractAdapter