org.eclipse.emf.ecore.util
Class BasicSettingDelegate

java.lang.Object
  extended by org.eclipse.emf.ecore.util.BasicSettingDelegate
All Implemented Interfaces:
EStructuralFeature.Internal.SettingDelegate
Direct Known Subclasses:
BasicSettingDelegate.Stateless

public abstract class BasicSettingDelegate
extends java.lang.Object
implements EStructuralFeature.Internal.SettingDelegate

A basic implementation of a stateful setting delegate. At least the first two of these methods need to be overridden.

Since:
2.6

Nested Class Summary
static class BasicSettingDelegate.Stateless
          A basic implementation of a stateless setting delegate.
 
Nested classes/interfaces inherited from interface org.eclipse.emf.ecore.EStructuralFeature.Internal.SettingDelegate
EStructuralFeature.Internal.SettingDelegate.Factory
 
Field Summary
protected  EStructuralFeature eStructuralFeature
           
 
Constructor Summary
BasicSettingDelegate(EStructuralFeature eStructuralFeature)
           
 
Method Summary
abstract  java.lang.Object dynamicGet(InternalEObject owner, EStructuralFeature.Internal.DynamicValueHolder settings, int dynamicFeatureID, boolean resolve, boolean coreType)
          Returns the value of the feature of this owner.
 NotificationChain dynamicInverseAdd(InternalEObject owner, EStructuralFeature.Internal.DynamicValueHolder settings, int dynamicFeatureID, InternalEObject otherEnd, NotificationChain notifications)
          Adds the object at the other end of a bidirectional reference to the appropriate feature and returns accumulated notifications.
 NotificationChain dynamicInverseRemove(InternalEObject owner, EStructuralFeature.Internal.DynamicValueHolder settings, int dynamicFeatureID, InternalEObject otherEnd, NotificationChain notifications)
          Removes the object at the other end of a bidirectional reference from the appropriate feature and returns accumulated notifications.
abstract  boolean dynamicIsSet(InternalEObject owner, EStructuralFeature.Internal.DynamicValueHolder settings, int dynamicFeatureID)
          Returns whether the feature of the owner is considered to be set.
 void dynamicSet(InternalEObject owner, EStructuralFeature.Internal.DynamicValueHolder settings, int dynamicFeatureID, java.lang.Object newValue)
          Sets the value of the given feature of the owner to the new value.
 EStructuralFeature.Setting dynamicSetting(InternalEObject owner, EStructuralFeature.Internal.DynamicValueHolder settings, int dynamicFeatureID)
          Returns a setting that can be used to access the owner's feature.
 void dynamicUnset(InternalEObject owner, EStructuralFeature.Internal.DynamicValueHolder settings, int dynamicFeatureID)
          Unsets the value of the given feature of the owner.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

eStructuralFeature

protected EStructuralFeature eStructuralFeature
Constructor Detail

BasicSettingDelegate

public BasicSettingDelegate(EStructuralFeature eStructuralFeature)
Method Detail

dynamicSetting

public EStructuralFeature.Setting dynamicSetting(InternalEObject owner,
                                                 EStructuralFeature.Internal.DynamicValueHolder settings,
                                                 int dynamicFeatureID)
Description copied from interface: EStructuralFeature.Internal.SettingDelegate
Returns a setting that can be used to access the owner's feature.

Specified by:
dynamicSetting in interface EStructuralFeature.Internal.SettingDelegate
Parameters:
owner - the owner of the feature.
settings - the owner's array of cached values.
dynamicFeatureID - the feature's index in the owner's cached dynamic values.
Returns:
a setting that can be used to access the owner's feature.
See Also:
InternalEObject.eSetting(EStructuralFeature)

dynamicGet

public abstract java.lang.Object dynamicGet(InternalEObject owner,
                                            EStructuralFeature.Internal.DynamicValueHolder settings,
                                            int dynamicFeatureID,
                                            boolean resolve,
                                            boolean coreType)
Description copied from interface: EStructuralFeature.Internal.SettingDelegate
Returns the value of the feature of this owner.

Specified by:
dynamicGet in interface EStructuralFeature.Internal.SettingDelegate
Parameters:
owner - the owner of the feature.
settings - the owner's array of cached values.
dynamicFeatureID - the feature's index in the owner's cached dynamic values.
resolve - whether to resolve.
coreType - return the core EMF object if value is a non-EMF wrapper/view.
Returns:
the value of the feature of this owner.
See Also:
EObject.eGet(EStructuralFeature, boolean)

dynamicIsSet

public abstract boolean dynamicIsSet(InternalEObject owner,
                                     EStructuralFeature.Internal.DynamicValueHolder settings,
                                     int dynamicFeatureID)
Description copied from interface: EStructuralFeature.Internal.SettingDelegate
Returns whether the feature of the owner is considered to be set.

Specified by:
dynamicIsSet in interface EStructuralFeature.Internal.SettingDelegate
Parameters:
owner - the owner of the feature.
settings - the owner's array of cached values.
dynamicFeatureID - the feature's index in the owner's cached dynamic values.
Returns:
whether the feature of the owner is considered to be set.
See Also:
EObject.eIsSet(EStructuralFeature)

dynamicSet

public void dynamicSet(InternalEObject owner,
                       EStructuralFeature.Internal.DynamicValueHolder settings,
                       int dynamicFeatureID,
                       java.lang.Object newValue)
Description copied from interface: EStructuralFeature.Internal.SettingDelegate
Sets the value of the given feature of the owner to the new value.

Specified by:
dynamicSet in interface EStructuralFeature.Internal.SettingDelegate
Parameters:
owner - the owner of the feature.
settings - the owner's array of cached values.
dynamicFeatureID - the feature's index in the owner's cached dynamic values.
newValue - the new value for the feature.
See Also:
EObject.eSet(EStructuralFeature, Object)

dynamicUnset

public void dynamicUnset(InternalEObject owner,
                         EStructuralFeature.Internal.DynamicValueHolder settings,
                         int dynamicFeatureID)
Description copied from interface: EStructuralFeature.Internal.SettingDelegate
Unsets the value of the given feature of the owner.

Specified by:
dynamicUnset in interface EStructuralFeature.Internal.SettingDelegate
Parameters:
owner - the owner of the feature.
settings - the owner's array of cached values.
dynamicFeatureID - the feature's index in the owner's cached dynamic values.
See Also:
EObject.eUnset(EStructuralFeature)

dynamicInverseAdd

public NotificationChain dynamicInverseAdd(InternalEObject owner,
                                           EStructuralFeature.Internal.DynamicValueHolder settings,
                                           int dynamicFeatureID,
                                           InternalEObject otherEnd,
                                           NotificationChain notifications)
Description copied from interface: EStructuralFeature.Internal.SettingDelegate
Adds the object at the other end of a bidirectional reference to the appropriate feature and returns accumulated notifications.

Specified by:
dynamicInverseAdd in interface EStructuralFeature.Internal.SettingDelegate
Parameters:
owner - the owner of the feature.
settings - the owner's array of cached values.
dynamicFeatureID - the feature's index in the owner's cached dynamic values.
otherEnd - the object to inverse add.
notifications - the incoming accumulated notifications.
Returns:
accumulated notifications.
See Also:
InternalEObject.eInverseAdd(org.eclipse.emf.ecore.InternalEObject, int, java.lang.Class, org.eclipse.emf.common.notify.NotificationChain)

dynamicInverseRemove

public NotificationChain dynamicInverseRemove(InternalEObject owner,
                                              EStructuralFeature.Internal.DynamicValueHolder settings,
                                              int dynamicFeatureID,
                                              InternalEObject otherEnd,
                                              NotificationChain notifications)
Description copied from interface: EStructuralFeature.Internal.SettingDelegate
Removes the object at the other end of a bidirectional reference from the appropriate feature and returns accumulated notifications.

Specified by:
dynamicInverseRemove in interface EStructuralFeature.Internal.SettingDelegate
Parameters:
owner - the owner of the feature.
settings - the owner's array of cached values.
dynamicFeatureID - the feature's index in the owner's cached dynamic values.
otherEnd - the object to inverse remove.
notifications - the incoming accumulated notifications.
Returns:
accumulated notifications.
See Also:
InternalEObject.eInverseRemove(org.eclipse.emf.ecore.InternalEObject, int, java.lang.Class, org.eclipse.emf.common.notify.NotificationChain)

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