org.eclipse.ocl.examples.eventmanager.framework
Class EventAdapter

java.lang.Object
  extended by org.eclipse.emf.common.notify.impl.AdapterImpl
      extended by org.eclipse.emf.ecore.util.EContentAdapter
          extended by org.eclipse.ocl.examples.eventmanager.framework.EventAdapter
All Implemented Interfaces:
org.eclipse.emf.common.notify.Adapter, org.eclipse.emf.common.notify.Adapter.Internal

public class EventAdapter
extends org.eclipse.emf.ecore.util.EContentAdapter

This special EContentAdapter is used to notify a given EventManager if any notification is raised ATTENTION: for the right registration at a target one have to use target.eAdapters().add(myAdapter);

Author:
Philipp Berger

Nested Class Summary
 
Nested classes/interfaces inherited from interface org.eclipse.emf.common.notify.Adapter
org.eclipse.emf.common.notify.Adapter.Internal
 
Field Summary
 
Fields inherited from class org.eclipse.emf.common.notify.impl.AdapterImpl
target
 
Constructor Summary
EventAdapter(EventManager eventManager)
          Constructs a new Adapter with the given EventManager as instance to notify NOTE: the EventManager is held as WeakReference
 
Method Summary
protected  void addAdapter(org.eclipse.emf.common.notify.Notifier notifier)
          Avoid duplicate adapter entry which would otherwise happen because objects may be "physically" contained in a Resource's contents but also be "logically" contained in another EObject by means of a containment reference.
 void notifyChanged(org.eclipse.emf.common.notify.Notification notification)
           
 
Methods inherited from class org.eclipse.emf.ecore.util.EContentAdapter
basicSetTarget, basicUnsetTarget, handleContainment, removeAdapter, resolve, selfAdapt, setTarget, setTarget, setTarget, setTarget, unsetTarget, unsetTarget, unsetTarget, unsetTarget, unsetTarget
 
Methods inherited from class org.eclipse.emf.common.notify.impl.AdapterImpl
getTarget, isAdapterForType
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

EventAdapter

public EventAdapter(EventManager eventManager)
Constructs a new Adapter with the given EventManager as instance to notify NOTE: the EventManager is held as WeakReference

Method Detail

addAdapter

protected void addAdapter(org.eclipse.emf.common.notify.Notifier notifier)
Avoid duplicate adapter entry which would otherwise happen because objects may be "physically" contained in a Resource's contents but also be "logically" contained in another EObject by means of a containment reference.

Overrides:
addAdapter in class org.eclipse.emf.ecore.util.EContentAdapter

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 org.eclipse.emf.ecore.util.EContentAdapter