## org.eclipse.emf.mint.util
Class GroupAdapterImpl

    java.lang.Object
      org.eclipse.emf.common.notify.impl.AdapterImpl
          org.eclipse.emf.mint.util.GroupAdapterImpl

All Implemented Interfaces:
  Adapter, Adapter.Internal

    public abstract class GroupAdapterImpl

extends AdapterImpl

Adapter for tracking changes to a group of related objects. Each time a related object is added to the group (typically through a reference), changes to its features are tracked and notifications forwarded to registered listeners. This is particularly useful when an object's derived feature depends on a feature that belongs to one of its referenced objects.

Clients may extend this class.

Nested Class Summary
`protected class` `GroupAdapterImpl.NotificationForwarder` Adapter used to forward notifications from related objects to the root object.
`protected static class` `GroupAdapterImpl.NotifierEList` Deprecated. no longer used

Nested classes/interfaces inherited from interface org.eclipse.emf.common.notify.Adapter
`Adapter.Internal`

Field Summary
`protected GroupAdapterImpl.NotifierEList` `targets` Deprecated. this adapter only tracks a single target

Fields inherited from class org.eclipse.emf.common.notify.impl.AdapterImpl
`target`

Constructor Summary
`GroupAdapterImpl()`

Method Summary
`protected void` `addGroupTargets(List<? extends Notifier> groupTargets)` Adds the given targets to the group of tracked targets.
`protected GroupAdapterImpl.NotificationForwarder` `createNotificationForwarder()` Creates a new @{link NotificationForwarder}.
`void` `dispose()` Disposes the adapter by removing it from its target.
`protected abstract List<EReference>` `getGroupReferences(EObject object)` Returns the object's references that define its direct relations.
`protected List<EObject>` `getGroupTargets(EObject object)` Returns the object's direct relations.
`protected Notifier` `getRootTarget()` Deprecated. use `AdapterImpl.getTarget()` instead
`protected boolean` `isGroupReference(EObject object, EReference ref)` Determines whether the object's reference participates in defining its relations.
`void` `notifyChanged(Notification msg)`
`protected void` `removeGroupTargets(List<? extends Notifier> groupTargets)` Removes the targets from the group of tracked targets.
`void` `setTarget(Notifier target)`
`void` `unsetTarget(Notifier target)`

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`

Field Detail

### targets

    protected GroupAdapterImpl.NotifierEList targets

  Deprecated. this adapter only tracks a single target
  Tracked targets (the group).

Constructor Detail

### GroupAdapterImpl

    public GroupAdapterImpl()

Method Detail

### setTarget

    public void setTarget(Notifier target)

  Specified by:
    `setTarget` in interface `Adapter`
  Overrides:
    `setTarget` in class `AdapterImpl`

### unsetTarget

    public void unsetTarget(Notifier target)

  Specified by:
    `unsetTarget` in interface `Adapter.Internal`
  Overrides:
    `unsetTarget` in class `AdapterImpl`

### dispose

    public void dispose()

  Disposes the adapter by removing it from its target.

### notifyChanged

    public void notifyChanged(Notification msg)

  Specified by:
    `notifyChanged` in interface `Adapter`
  Overrides:
    `notifyChanged` in class `AdapterImpl`

### createNotificationForwarder

    protected GroupAdapterImpl.NotificationForwarder createNotificationForwarder()

  Creates a new @{link NotificationForwarder}.

  Returns:
    new notification forwarder

### addGroupTargets

    protected void addGroupTargets(List<? extends Notifier> groupTargets)

  Adds the given targets to the group of tracked targets.

  Parameters:
    `groupTargets` - new targets to track

### removeGroupTargets

    protected void removeGroupTargets(List<? extends Notifier> groupTargets)

  Removes the targets from the group of tracked targets.

  Parameters:
    `groupTargets` - targets to remove from the group

### getGroupTargets

    protected List<EObject> getGroupTargets(EObject object)

  Returns the object's direct relations.

  Parameters:
    `object` - object whose direct relations to return
  Returns:
    object's direct relations

### isGroupReference

    protected boolean isGroupReference(EObject object,
                                       EReference ref)

  Determines whether the object's reference participates in defining its relations.

  Parameters:
    `object` - object
    `ref` - object's reference
  Returns:
    `true` if the given reference contributes its direct relations

### getGroupReferences

    protected abstract List<EReference> getGroupReferences(EObject object)

  Returns the object's references that define its direct relations.

  Parameters:
    `object` - object whose references to return
  Returns:
    object's references that define its direct relations

### getRootTarget

    protected Notifier getRootTarget()

  Deprecated. use `AdapterImpl.getTarget()` instead

  Returns the group's root object.

  Returns:
    the group's root object

Copyright 2008, 2009 Ecliptical Software Inc. and others. All Rights Reserved.