org.eclipse.emf.ecore.util
Class EContentAdapter

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

public class EContentAdapter
extends AdapterImpl

An adapter that maintains itself as an adapter for all contained objects as they come and go. It can be installed for an EObject, a Resource, or a ResourceSet.


Nested Class Summary
 
Nested classes/interfaces inherited from interface org.eclipse.emf.common.notify.Adapter
Adapter.Internal
 
Field Summary
 
Fields inherited from class org.eclipse.emf.common.notify.impl.AdapterImpl
target
 
Constructor Summary
EContentAdapter()
           
 
Method Summary
protected  void addAdapter(Notifier notifier)
           
protected  void basicSetTarget(Notifier target)
          Actually sets the target by calling super.
protected  void basicUnsetTarget(Notifier target)
          Actually unsets the target by calling super.
protected  void handleContainment(Notification notification)
          Handles a containment change by adding and removing the adapter as appropriate.
 void notifyChanged(Notification notification)
          Handles a notification by calling selfAdapter.
protected  void removeAdapter(Notifier notifier)
           
protected  boolean resolve()
           
protected  void selfAdapt(Notification notification)
          Handles a notification by calling handleContainment for any containment-based notification.
protected  void setTarget(EObject target)
          Handles installation of the adapter on an EObject by adding the adapter to each of the directly contained objects.
 void setTarget(Notifier target)
          Handles installation of the adapter by adding the adapter to each of the directly contained objects.
protected  void setTarget(Resource target)
          Handles installation of the adapter on a Resource by adding the adapter to each of the directly contained objects.
protected  void setTarget(ResourceSet target)
          Handles installation of the adapter on a ResourceSet by adding the adapter to each of the directly contained objects.
protected  void unsetTarget(EObject target)
          Handles undoing the installation of the adapter from an EObject by removing the adapter from each of the directly contained objects.
 void unsetTarget(Notifier target)
          Handles undoing the installation of the adapter by removing the adapter from each of the directly contained objects.
protected  void unsetTarget(java.lang.Object target)
          Deprecated. Use or override unsetTarget(Notifier) instead.
protected  void unsetTarget(Resource target)
          Handles undoing the installation of the adapter from a Resource by removing the adapter from each of the directly contained objects.
protected  void unsetTarget(ResourceSet target)
          Handles undoing the installation of the adapter from a ResourceSet by removing the adapter from each of the directly contained objects.
 
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

EContentAdapter

public EContentAdapter()
Method Detail

notifyChanged

public void notifyChanged(Notification notification)
Handles a notification by calling selfAdapter.

Specified by:
notifyChanged in interface Adapter
Overrides:
notifyChanged in class AdapterImpl
Parameters:
notification - a description of the change.

selfAdapt

protected void selfAdapt(Notification notification)
Handles a notification by calling handleContainment for any containment-based notification.


handleContainment

protected void handleContainment(Notification notification)
Handles a containment change by adding and removing the adapter as appropriate.


setTarget

public void setTarget(Notifier target)
Handles installation of the adapter by adding the adapter to each of the directly contained objects.

Specified by:
setTarget in interface Adapter
Overrides:
setTarget in class AdapterImpl
Parameters:
target - the new notifier.
See Also:
Adapter.getTarget()

basicSetTarget

protected void basicSetTarget(Notifier target)
Actually sets the target by calling super.


setTarget

protected void setTarget(EObject target)
Handles installation of the adapter on an EObject by adding the adapter to each of the directly contained objects.


setTarget

protected void setTarget(Resource target)
Handles installation of the adapter on a Resource by adding the adapter to each of the directly contained objects.


setTarget

protected void setTarget(ResourceSet target)
Handles installation of the adapter on a ResourceSet by adding the adapter to each of the directly contained objects.


unsetTarget

public void unsetTarget(Notifier target)
Handles undoing the installation of the adapter by removing the adapter from each of the directly contained objects.

Specified by:
unsetTarget in interface Adapter.Internal
Overrides:
unsetTarget in class AdapterImpl
Parameters:
target - the old notifier.
See Also:
Adapter.getTarget(), Adapter.setTarget(Notifier)

basicUnsetTarget

protected void basicUnsetTarget(Notifier target)
Actually unsets the target by calling super.


unsetTarget

@Deprecated
protected void unsetTarget(java.lang.Object target)
Deprecated. Use or override unsetTarget(Notifier) instead.

Handles undoing the installation of the adapter by removing the adapter from each of the directly contained objects.


unsetTarget

protected void unsetTarget(EObject target)
Handles undoing the installation of the adapter from an EObject by removing the adapter from each of the directly contained objects.


unsetTarget

protected void unsetTarget(Resource target)
Handles undoing the installation of the adapter from a Resource by removing the adapter from each of the directly contained objects.


unsetTarget

protected void unsetTarget(ResourceSet target)
Handles undoing the installation of the adapter from a ResourceSet by removing the adapter from each of the directly contained objects.


addAdapter

protected void addAdapter(Notifier notifier)

removeAdapter

protected void removeAdapter(Notifier notifier)

resolve

protected boolean resolve()

Copyright 2001-2006 IBM Corporation and others.
All Rights Reserved.