org.eclipse.ocl.ecore.delegate
Class DelegateEPackageAdapter

java.lang.Object
  extended by org.eclipse.emf.common.notify.impl.AdapterImpl
      extended by org.eclipse.ocl.ecore.delegate.DelegateEPackageAdapter
All Implemented Interfaces:
org.eclipse.emf.common.notify.Adapter, org.eclipse.emf.common.notify.Adapter.Internal

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

DelegateEPackageAdapter extends an EPackage to cache its DelegateDomain that supervises installation of OCL annotations from an OCL document.

Since:
3.0

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  java.util.Map<java.lang.String,java.util.List<DelegateDomain>> delegatedBehaviorMap
          The map from behavior name to corresponding DelegateDomain.
protected  java.util.Map<java.lang.String,DelegateDomain> delegateDomainMap
          The map from delegateURI to known DelegateDomain.
 
Fields inherited from class org.eclipse.emf.common.notify.impl.AdapterImpl
target
 
Constructor Summary
DelegateEPackageAdapter()
           
 
Method Summary
protected  DelegateDomain createDelegateDomain(java.lang.String delegateURI)
           
static DelegateEPackageAdapter findAdapter(org.eclipse.emf.ecore.EPackage ePackage)
          Return the DelegateEPackageAdapter for ePackage, if there is one, or null if none.
static DelegateEPackageAdapter getAdapter(org.eclipse.emf.ecore.EPackage ePackage)
          Return the DelegateEPackageAdapter for ePackage, creating one if necessary.
 DelegateDomain getDelegateDomain(java.lang.String delegateURI)
          Return the DelegateDomain for this package and for delegateURI, returning null it does not exist.
 java.util.Map<java.lang.String,DelegateDomain> getDelegateDomains()
           
 java.util.List<DelegateDomain> getDelegateDomains(DelegatedBehavior<?,?,?> delegatedBehavior)
           
 org.eclipse.emf.ecore.EPackage getTarget()
           
 boolean isAdapterForType(java.lang.Object type)
           
 void setTarget(org.eclipse.emf.common.notify.Notifier newTarget)
           
 void unloadDelegates()
           
 
Methods inherited from class org.eclipse.emf.common.notify.impl.AdapterImpl
notifyChanged, unsetTarget
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

delegateDomainMap

protected java.util.Map<java.lang.String,DelegateDomain> delegateDomainMap
The map from delegateURI to known DelegateDomain. Mappings are established lazily by getDelegateDomain(java.lang.String).


delegatedBehaviorMap

protected java.util.Map<java.lang.String,java.util.List<DelegateDomain>> delegatedBehaviorMap
The map from behavior name to corresponding DelegateDomain. This is defined by an http://www.eclipse.org/emf/2002/Ecore EPackage annotation with the behavior name as a key and the delegateURIs as a comma separated list.

Constructor Detail

DelegateEPackageAdapter

public DelegateEPackageAdapter()
Method Detail

findAdapter

public static DelegateEPackageAdapter findAdapter(org.eclipse.emf.ecore.EPackage ePackage)
Return the DelegateEPackageAdapter for ePackage, if there is one, or null if none.

Since:
3.1

getAdapter

public static DelegateEPackageAdapter getAdapter(org.eclipse.emf.ecore.EPackage ePackage)
Return the DelegateEPackageAdapter for ePackage, creating one if necessary.


createDelegateDomain

protected DelegateDomain createDelegateDomain(java.lang.String delegateURI)

getDelegateDomain

public DelegateDomain getDelegateDomain(java.lang.String delegateURI)
Return the DelegateDomain for this package and for delegateURI, returning null it does not exist.


getDelegateDomains

public java.util.Map<java.lang.String,DelegateDomain> getDelegateDomains()

getDelegateDomains

public java.util.List<DelegateDomain> getDelegateDomains(DelegatedBehavior<?,?,?> delegatedBehavior)

getTarget

public org.eclipse.emf.ecore.EPackage getTarget()
Specified by:
getTarget in interface org.eclipse.emf.common.notify.Adapter
Overrides:
getTarget in class org.eclipse.emf.common.notify.impl.AdapterImpl

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

setTarget

public void setTarget(org.eclipse.emf.common.notify.Notifier newTarget)
Specified by:
setTarget in interface org.eclipse.emf.common.notify.Adapter
Overrides:
setTarget in class org.eclipse.emf.common.notify.impl.AdapterImpl

unloadDelegates

public void unloadDelegates()