org.eclipse.emf.ecore.impl
Class BasicEObjectImpl

java.lang.Object
  extended by org.eclipse.emf.common.notify.impl.BasicNotifierImpl
      extended by org.eclipse.emf.ecore.impl.BasicEObjectImpl
All Implemented Interfaces:
Notifier, EObject, InternalEObject
Direct Known Subclasses:
EObjectImpl

public class BasicEObjectImpl
extends BasicNotifierImpl
implements EObject, InternalEObject

An implementation of the model object 'EObject'.


Nested Class Summary
protected static interface BasicEObjectImpl.EPropertiesHolder
          An internal interface for holding less frequently members variables.
protected static class BasicEObjectImpl.EPropertiesHolderBaseImpl
          An internal class for holding the least frequently members variables.
protected static class BasicEObjectImpl.EPropertiesHolderImpl
          An internal class for holding less frequently members variables.
 
Nested classes/interfaces inherited from class org.eclipse.emf.common.notify.impl.BasicNotifierImpl
BasicNotifierImpl.EAdapterList<E extends java.lang.Object & Adapter>
 
Nested classes/interfaces inherited from interface org.eclipse.emf.ecore.InternalEObject
InternalEObject.EStore
 
Field Summary
protected static int EVIRTUAL_GET
          An action code indicating that an index needs to be computed to perform a get.
protected static int EVIRTUAL_IS_SET
          An action code indicating that an index needs to be computed to perform an isSet.
protected static java.lang.Object EVIRTUAL_NO_VALUE
           
protected static int EVIRTUAL_SET
          An action code indicating that an index needs to be computed to perform a eVirtualSet(int, Object) set.
protected static int EVIRTUAL_UNSET
          An action code indicating that an eVirtualIndex(int, int) index needs to be computed to perform an unset.
 
Fields inherited from interface org.eclipse.emf.ecore.InternalEObject
EOPPOSITE_FEATURE_BASE
 
Constructor Summary
protected BasicEObjectImpl()
          Creates a basic EObject.
 
Method Summary
protected  void eAddVirtualValue(int index, java.lang.Object value)
          Adds the value at the index.
 TreeIterator<EObject> eAllContents()
          Returns a tree iterator that iterates over all the direct contents and indirect contents of this object.
 int eBaseStructuralFeatureID(int derivedFeatureID, java.lang.Class<?> baseClass)
          Returns the feature ID relative to the base class, given a feature ID relative to this derived object's actual class.
protected  BasicEObjectImpl.EPropertiesHolder eBasicProperties()
           
 NotificationChain eBasicRemoveFromContainer(NotificationChain msgs)
          Removes this object from whatever container holds it, and returns accumulated notifications.
 NotificationChain eBasicRemoveFromContainerFeature(NotificationChain msgs)
           
protected  void eBasicSetContainer(InternalEObject newContainer, int newContainerFeatureID)
           
 NotificationChain eBasicSetContainer(InternalEObject newContainer, int newContainerFeatureID, NotificationChain msgs)
          Sets the container to be new container and appropriate feature.
 EClass eClass()
          Returns the meta class.
protected  int eComputeVirtualValuesCapacity(int minimumCapacity)
          This method controls the growth of the virtual values by returning the new capacity that should be allocated for the given minimum required capacity.
 EObject eContainer()
          Returns the containing object, or null.
 int eContainerFeatureID()
          Returns the container feature ID.
 EStructuralFeature eContainingFeature()
          Returns the particular feature of the container that actually holds the object, or null, if there is no container.
 EReference eContainmentFeature()
          Returns the containment feature that properly contains the object, or null, if there is no container.
protected static EReference eContainmentFeature(EObject eObject, EObject eContainer, int eContainerFeatureID)
           
 boolean eContains(EObject eObject)
           
 EList<EObject> eContents()
          Returns a list view of the content objects; it is unmodifiable.
 EList<EObject> eCrossReferences()
          Returns a list view of the cross referenced objects; it is unmodifiable.
 int eDerivedStructuralFeatureID(EStructuralFeature eStructuralFeature)
           
 int eDerivedStructuralFeatureID(int baseFeatureID, java.lang.Class<?> baseClass)
          Returns the feature ID relative to this derived object's actual class, given a feature ID relative to the given base class.
 Resource.Internal eDirectResource()
          Returns the directly containing internal resource, or null.
 NotificationChain eDynamicBasicRemoveFromContainer(NotificationChain msgs)
           
protected  EClass eDynamicClass()
           
protected  EStructuralFeature eDynamicFeature(int dynamicFeatureID)
           
protected  int eDynamicFeatureID(EStructuralFeature eStructuralFeature)
           
 java.lang.Object eDynamicGet(EStructuralFeature eFeature, boolean resolve)
           
 java.lang.Object eDynamicGet(int featureID, boolean resolve, boolean coreType)
           
protected  java.lang.Object eDynamicGet(int dynamicFeatureID, EStructuralFeature eFeature, boolean resolve, boolean coreType)
           
 NotificationChain eDynamicInverseAdd(InternalEObject otherEnd, int featureID, java.lang.Class<?> inverseClass, NotificationChain msgs)
           
protected  NotificationChain eDynamicInverseAdd(InternalEObject otherEnd, int featureID, NotificationChain msgs)
           
 NotificationChain eDynamicInverseRemove(InternalEObject otherEnd, int featureID, java.lang.Class<?> inverseClass, NotificationChain msgs)
           
protected  NotificationChain eDynamicInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs)
           
 boolean eDynamicIsSet(EStructuralFeature eFeature)
           
 boolean eDynamicIsSet(int featureID)
           
protected  boolean eDynamicIsSet(int dynamicFeatureID, EStructuralFeature eFeature)
           
 void eDynamicSet(EStructuralFeature eFeature, java.lang.Object newValue)
           
protected  void eDynamicSet(int dynamicFeatureID, EStructuralFeature eFeature, java.lang.Object newValue)
           
 void eDynamicSet(int featureID, java.lang.Object newValue)
           
 void eDynamicUnset(EStructuralFeature eFeature)
           
 void eDynamicUnset(int featureID)
           
protected  void eDynamicUnset(int dynamicFeatureID, EStructuralFeature eFeature)
           
 java.lang.Object eGet(EStructuralFeature eFeature)
          Returns the value of the given feature of this object.
 java.lang.Object eGet(EStructuralFeature eFeature, boolean resolve)
          Returns the value of the given feature of the object; the value is optionally resolved before it is returned.
 java.lang.Object eGet(EStructuralFeature eFeature, boolean resolve, boolean coreType)
          Returns the value of the given feature of the object; the value is optionally resolved before it is returned.
 java.lang.Object eGet(int featureID, boolean resolve, boolean coreType)
          Does the equivalent of eObject.eGet(eObjecte.eClass().getEStructuralFeature(featureID), resolve, coreType).
protected  boolean eHasSettings()
           
 InternalEObject eInternalContainer()
          Returns the internal container, or null.
 Resource.Internal eInternalResource()
          Returns the containing internal resource, or null.
 NotificationChain eInverseAdd(InternalEObject otherEnd, int featureID, java.lang.Class<?> baseClass, NotificationChain msgs)
          Adds the object at the other end of a bidirectional reference to the appropriate feature and returns accumulated notifications.
 NotificationChain eInverseAdd(InternalEObject otherEnd, int featureID, NotificationChain msgs)
           
 NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, java.lang.Class<?> baseClass, NotificationChain msgs)
          Removes the object at the other end of a bidirectional reference from the appropriate feature and returns accumulated notifications.
 NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs)
           
 boolean eIsProxy()
          Indicates whether this object is a proxy.
 boolean eIsSet(EStructuralFeature eFeature)
          Returns whether the feature of the object is considered to be set.
 boolean eIsSet(int featureID)
          Does the equivalent of eObject.eIsSet(eObjecte.eClass().getEStructuralFeature(featureID)).
 EObject eObjectForURIFragmentSegment(java.lang.String uriFragmentSegment)
          Returns the object resolved by the fragment segment.
 java.lang.Object eOpenGet(EStructuralFeature eFeature, boolean resolve)
           
 boolean eOpenIsSet(EStructuralFeature eFeature)
           
 void eOpenSet(EStructuralFeature eFeature, java.lang.Object newValue)
           
 void eOpenUnset(EStructuralFeature eFeature)
           
protected  BasicEObjectImpl.EPropertiesHolder eProperties()
           
 URI eProxyURI()
          Returns the proxy URI of this object.
protected  java.lang.Object eRemoveVirtualValue(int index)
          Removes the value at the index.
 EObject eResolveProxy(InternalEObject proxy)
          Resolves the proxy object relative to this object.
 Resource eResource()
          Returns the containing resource, or null.
 void eSet(EStructuralFeature eFeature, java.lang.Object newValue)
          Sets the value of the given feature of the object to the new value.
 void eSet(int featureID, java.lang.Object newValue)
          Does the equivalent of eObject.eSet(eObjecte.eClass().getEStructuralFeature(featureID), newValue).
 void eSetClass(EClass eClass)
          Sets the meta class.
protected  void eSetDirectResource(Resource.Internal resource)
           
 void eSetProxyURI(URI uri)
          Set the proxy URI of this object.
 NotificationChain eSetResource(Resource.Internal resource, NotificationChain notifications)
          Sets this object to be directly contained by the resource and returns accumulated notifications.
 void eSetStore(InternalEObject.EStore store)
          Set the store associated with this object.
 EStructuralFeature.Setting eSetting(EStructuralFeature eFeature)
          Returns a setting that can be used to access this object's feature.
protected  EStructuralFeature.Internal.SettingDelegate eSettingDelegate(EStructuralFeature eFeature)
           
protected  EStructuralFeature.Internal.DynamicValueHolder eSettings()
           
protected  void eSetVirtualIndexBits(int offset, int newIndexBits)
          Sets the bit pattern at the given offset within the sequence of bit patterns representing which features are assigned an index in the virtual values.
protected  java.lang.Object eSetVirtualValue(int index, java.lang.Object value)
          Sets the value at the index.
protected  void eSetVirtualValues(java.lang.Object[] newValues)
          Sets the array of virtual values of the features that are current set.
protected  EClass eStaticClass()
           
protected  int eStaticFeatureCount()
           
 InternalEObject.EStore eStore()
          Returns the store associated with this object.
 void eUnset(EStructuralFeature eFeature)
          Unsets the feature of the object.
 void eUnset(int featureID)
          Does the equivalent of eObject.eUnset(eObjecte.eClass().getEStructuralFeature(featureID)).
 java.lang.String eURIFragmentSegment(EStructuralFeature eStructuralFeature, EObject eObject)
          Returns the fragment segment that, when passed to eObjectForURIFragmentSegment, will resolve to the given object in this object's given feature.
protected static int eVirtualBitCount(int value)
          Returns the number of bits that are on in the two's complement bit pattern.
 java.lang.Object eVirtualGet(int eDerivedStructuralFeatureID)
          Returns the value for the feature ID, or null, if there isn't one.
 java.lang.Object eVirtualGet(int eDerivedStructuralFeatureID, java.lang.Object defaultValue)
          Returns the value for the feature ID, or the default value, if there isn't one.
protected  int eVirtualIndex(int eDerivedStructuralFeatureID, int action)
          Returns the index in the virtual values for the feature ID, with the side effect of toggling the necessary bits to suit the action code.
protected  int eVirtualIndexBits(int offset)
          Returns the bit pattern at the given offset within the sequence of bit patterns representing which features are assigned an index in the virtual values.
 boolean eVirtualIsSet(int eDerivedStructuralFeatureID)
          Returns whether there is a value set for the feature ID.
 java.lang.Object eVirtualSet(int eDerivedStructuralFeatureID, java.lang.Object value)
          Sets the value for the feature ID.
 java.lang.Object eVirtualUnset(int eDerivedStructuralFeatureID)
          Unsets the value for the feature ID.
protected  java.lang.Object eVirtualValue(int index)
          Returns the value at the index.
protected  java.lang.Object[] eVirtualValues()
          Returns the array of virtual values of the features that are current set.
 java.lang.String toString()
           
 
Methods inherited from class org.eclipse.emf.common.notify.impl.BasicNotifierImpl
eAdapters, eBasicAdapters, eDeliver, eNotificationRequired, eNotify, eSetDeliver
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.eclipse.emf.ecore.InternalEObject
eNotificationRequired
 

Field Detail

EVIRTUAL_SET

protected static final int EVIRTUAL_SET
An action code indicating that an index needs to be computed to perform a eVirtualSet(int, Object) set.

See Also:
Constant Field Values

EVIRTUAL_UNSET

protected static final int EVIRTUAL_UNSET
An action code indicating that an eVirtualIndex(int, int) index needs to be computed to perform an unset.

See Also:
Constant Field Values

EVIRTUAL_GET

protected static final int EVIRTUAL_GET
An action code indicating that an index needs to be computed to perform a get.

See Also:
Constant Field Values

EVIRTUAL_IS_SET

protected static final int EVIRTUAL_IS_SET
An action code indicating that an index needs to be computed to perform an isSet.

See Also:
Constant Field Values

EVIRTUAL_NO_VALUE

protected static final java.lang.Object EVIRTUAL_NO_VALUE
Constructor Detail

BasicEObjectImpl

protected BasicEObjectImpl()
Creates a basic EObject.

Method Detail

eStaticFeatureCount

protected int eStaticFeatureCount()

eProperties

protected BasicEObjectImpl.EPropertiesHolder eProperties()

eBasicProperties

protected BasicEObjectImpl.EPropertiesHolder eBasicProperties()

eHasSettings

protected boolean eHasSettings()

eSettings

protected EStructuralFeature.Internal.DynamicValueHolder eSettings()

eDynamicFeatureID

protected int eDynamicFeatureID(EStructuralFeature eStructuralFeature)

eDynamicFeature

protected EStructuralFeature eDynamicFeature(int dynamicFeatureID)

eURIFragmentSegment

public java.lang.String eURIFragmentSegment(EStructuralFeature eStructuralFeature,
                                            EObject eObject)
Description copied from interface: InternalEObject
Returns the fragment segment that, when passed to eObjectForURIFragmentSegment, will resolve to the given object in this object's given feature.

The feature argument may be null in which case it will be deduced, if possible. The default result will be of the form:

  "@<feature-name>[.<index>]"
The index is used only for many-valued features; it represents the position within the list.

Specified by:
eURIFragmentSegment in interface InternalEObject
Parameters:
eStructuralFeature - the feature relating the given object to this object, or null.
eObject - the object to be identified.
Returns:
the fragment segment that resolves to the given object in this object's given feature.

eObjectForURIFragmentSegment

public EObject eObjectForURIFragmentSegment(java.lang.String uriFragmentSegment)
Description copied from interface: InternalEObject
Returns the object resolved by the fragment segment.

The fragment segment encoding will typically be of the form returned by eURIFragmentSegment.

Specified by:
eObjectForURIFragmentSegment in interface InternalEObject
Parameters:
uriFragmentSegment - a fragment segment.
Returns:
the fragment segment that resolves to the given object in this object's given feature.

eContains

public boolean eContains(EObject eObject)

eContainer

public EObject eContainer()
Description copied from interface: EObject
Returns the containing object, or null.

An object is contained by another object if it appears in the contents of that object. The object will be contained by a containment feature of the containing object.

Specified by:
eContainer in interface EObject
Returns:
the containing object.
See Also:
EObject.eResource(), EcoreUtil.remove(EObject), EObject.eContainmentFeature(), EObject.eContainingFeature(), EcoreUtil.getRootContainer(EObject), EObject.eContents()

eInternalContainer

public InternalEObject eInternalContainer()
Description copied from interface: InternalEObject
Returns the internal container, or null. It does not resolve a proxy.

Specified by:
eInternalContainer in interface InternalEObject
Returns:
the internal container.
See Also:
EObject.eContainer(), InternalEObject.eDirectResource()

eContainerFeatureID

public int eContainerFeatureID()
Description copied from interface: InternalEObject
Returns the container feature ID. If the container isn't a navigable feature, this will be a negative ID indicating the inverse of the containment feature's ID.

Specified by:
eContainerFeatureID in interface InternalEObject
Returns:
the container feature ID.
See Also:
EObject.eContainmentFeature(), InternalEObject.EOPPOSITE_FEATURE_BASE

eBasicSetContainer

protected void eBasicSetContainer(InternalEObject newContainer,
                                  int newContainerFeatureID)

eContents

public EList<EObject> eContents()
Description copied from interface: EObject
Returns a list view of the content objects; it is unmodifiable.

This will be the list of EObjects determined by the contents of the containment features of this object's meta class. Objects can, indirectly, be removed and will change to reflect container changes. The implicit tree of contents is also directly available.

Specified by:
eContents in interface EObject
Returns:
a list view of the content objects.
See Also:
EObject.eContainer(), EClass.getEAllContainments(), EObject.eGet(EStructuralFeature), EcoreUtil.remove(EObject), EObject.eAllContents()

eCrossReferences

public EList<EObject> eCrossReferences()
Description copied from interface: EObject
Returns a list view of the cross referenced objects; it is unmodifiable.

This will be the list of EObjects determined by the contents of the reference features of this object's meta class, excluding containment features and their opposites. The cross reference list's iterator will be of type EContentsEList.FeatureIterator, for efficient determination of the feature of each cross reference in the list, e.g.,

  for (EContentEList.FeatureIterator featureIterator = 
        (EContentEList.FeatureIterator)eObject.eCrossReferences().iterator();
       featureIterator.hasNext(); )
  {
    EObject eObject = (EObject)featureIterator.next();
    EReference eReference = (EReference)featureIterator.feature();
    ...
  }

Specified by:
eCrossReferences in interface EObject
Returns:
a list view of the cross referenced objects.
See Also:
EObject.eContents(), EClass.getEAllReferences(), EClass.getEAllContainments(), EObject.eGet(EStructuralFeature), EcoreUtil.CrossReferencer

eAllContents

public TreeIterator<EObject> eAllContents()
Description copied from interface: EObject
Returns a tree iterator that iterates over all the direct contents and indirect contents of this object.

Specified by:
eAllContents in interface EObject
Returns:
a tree iterator that iterates over all contents.
See Also:
Resource.getAllContents(), EcoreUtil.getAllContents(EObject, boolean)

eContainmentFeature

public EReference eContainmentFeature()
Description copied from interface: EObject
Returns the containment feature that properly contains the object, or null, if there is no container. Because of support for wildcard content, this feature may not be a direct feature of the container's class, but rather a feature of an entry in a feature map feature of the container's class.

Specified by:
eContainmentFeature in interface EObject
Returns:
the feature that properly contains the object.
See Also:
EObject.eContainer(), EObject.eContainingFeature(), EReference.isContainment(), EClass.getEAllContainments(), FeatureMap.Entry.getEStructuralFeature()

eContainmentFeature

protected static EReference eContainmentFeature(EObject eObject,
                                                EObject eContainer,
                                                int eContainerFeatureID)

eContainingFeature

public EStructuralFeature eContainingFeature()
Description copied from interface: EObject
Returns the particular feature of the container that actually holds the object, or null, if there is no container. Because of support for wildcard content, this feature may be an attribute representing a feature map; in this case the object is referenced by the containment feature of an entry in the map, i.e., the eContainmentFeature.

Specified by:
eContainingFeature in interface EObject
Returns:
the feature that actually contains the object.
See Also:
EObject.eContainer(), EObject.eContainmentFeature(), EClass.getEAllContainments(), EReference.isContainment(), FeatureMap.Entry.getEStructuralFeature()

eDirectResource

public Resource.Internal eDirectResource()
Description copied from interface: InternalEObject
Returns the directly containing internal resource, or null.

Specified by:
eDirectResource in interface InternalEObject
Returns:
the directly containing internal resource.
See Also:
EObject.eResource(), InternalEObject.eInternalResource(), InternalEObject.eInternalContainer()

eResource

public Resource eResource()
Description copied from interface: EObject
Returns the containing resource, or null.

An object is contained in a resource if it, or one of it's containers, appears in the contents of that resource.

An object must be contained by a resource in order to be serialized.

Specified by:
eResource in interface EObject
Returns:
the containing resource.
See Also:
EcoreUtil.remove(EObject), EObject.eContainer()

eInternalResource

public Resource.Internal eInternalResource()
Description copied from interface: InternalEObject
Returns the containing internal resource, or null.

Specified by:
eInternalResource in interface InternalEObject
Returns:
the containing internal resource.
See Also:
EObject.eResource()

eSetResource

public NotificationChain eSetResource(Resource.Internal resource,
                                      NotificationChain notifications)
Description copied from interface: InternalEObject
Sets this object to be directly contained by the resource and returns accumulated notifications. This is only done as the inverse of Resource.getContents().add(this).

Specified by:
eSetResource in interface InternalEObject
Returns:
accumulated notifications.

eSetDirectResource

protected void eSetDirectResource(Resource.Internal resource)

eGet

public java.lang.Object eGet(EStructuralFeature eFeature)
Description copied from interface: EObject
Returns the value of the given feature of this object.

It returns the resolved value, i.e., it returns

  eObject.eGet(feature, true)

Specified by:
eGet in interface EObject
Parameters:
eFeature - the feature of the value to fetch.
Returns:
the value of the given feature of this object.
See Also:
EObject.eGet(EStructuralFeature, boolean)

eGet

public java.lang.Object eGet(EStructuralFeature eFeature,
                             boolean resolve)
Description copied from interface: EObject
Returns the value of the given feature of the object; the value is optionally resolved before it is returned.

If the feature is many-valued, the result will be an EList and each object in the list will be an instance of the feature's type; the list's contents are not affected by resolve argument. Otherwise the result directly will be an instance of the feature's type; if it is a proxy, it is resolved.

Specified by:
eGet in interface EObject
Parameters:
eFeature - the feature of the value to fetch.
resolve - whether to resolve.
Returns:
the value of the given feature of the object.
See Also:
InternalEList.basicIterator(), InternalEList.basicList(), EcoreUtil.resolve(EObject, org.eclipse.emf.ecore.resource.ResourceSet), EObject.eSet(EStructuralFeature, Object), EObject.eUnset(EStructuralFeature), EObject.eIsSet(EStructuralFeature), EObject.eGet(EStructuralFeature)

eGet

public java.lang.Object eGet(EStructuralFeature eFeature,
                             boolean resolve,
                             boolean coreType)
Description copied from interface: InternalEObject
Returns the value of the given feature of the object; the value is optionally resolved before it is returned.

If the feature is many-valued, the result will be an EList and each object in the list will be an instance of the feature's type; the list's contents are not affected by resolve argument. Otherwise the result directly will be an instance of the feature's type; if it is a proxy, it is resolved. The core type specifies whether to return the core reflective value, e.g., EMap, or the public API value, e.g., Map.

Specified by:
eGet in interface InternalEObject
Parameters:
eFeature - the feature of the value to fetch.
resolve - whether to resolve.
coreType - whether to return the core type value or the API type value.
Returns:
the value of the given feature of the object.
See Also:
EObject.eGet(EStructuralFeature, boolean)

eGet

public java.lang.Object eGet(int featureID,
                             boolean resolve,
                             boolean coreType)
Description copied from interface: InternalEObject
Does the equivalent of eObject.eGet(eObjecte.eClass().getEStructuralFeature(featureID), resolve, coreType).

Specified by:
eGet in interface InternalEObject
See Also:
InternalEObject.eGet(EStructuralFeature, boolean, boolean)

eDynamicGet

public java.lang.Object eDynamicGet(EStructuralFeature eFeature,
                                    boolean resolve)

eDynamicGet

public java.lang.Object eDynamicGet(int featureID,
                                    boolean resolve,
                                    boolean coreType)

eDynamicGet

protected java.lang.Object eDynamicGet(int dynamicFeatureID,
                                       EStructuralFeature eFeature,
                                       boolean resolve,
                                       boolean coreType)

eOpenGet

public java.lang.Object eOpenGet(EStructuralFeature eFeature,
                                 boolean resolve)

eSet

public void eSet(EStructuralFeature eFeature,
                 java.lang.Object newValue)
Description copied from interface: EObject
Sets the value of the given feature of the object to the new value.

If the feature is many-valued, the new value must be an EList and each object in that list must be an instance of the feature's type; the existing contents are cleared and the contents of the new value are added. However, if the new value is the content list itself, or is modified as a side effect of modifying the content list (i.e., if it is a view on the content list), the behavior is undefined and will likely result in simply clearing the list. If the feature is single-valued, the new value directly must be an instance of the feature's type and it becomes the new value of the feature of the object. If the feature is unsettable, the modeled state becomes set; otherwise, the feature may still not considered set if the new value is the same as the default.

Specified by:
eSet in interface EObject
Parameters:
eFeature - the feature of the value to set.
See Also:
EObject.eUnset(EStructuralFeature), EObject.eIsSet(EStructuralFeature), EObject.eGet(EStructuralFeature, boolean)

eSet

public void eSet(int featureID,
                 java.lang.Object newValue)
Description copied from interface: InternalEObject
Does the equivalent of eObject.eSet(eObjecte.eClass().getEStructuralFeature(featureID), newValue).

Specified by:
eSet in interface InternalEObject
See Also:
EObject.eSet(EStructuralFeature, Object)

eDynamicSet

public void eDynamicSet(EStructuralFeature eFeature,
                        java.lang.Object newValue)

eDynamicSet

public void eDynamicSet(int featureID,
                        java.lang.Object newValue)

eDynamicSet

protected void eDynamicSet(int dynamicFeatureID,
                           EStructuralFeature eFeature,
                           java.lang.Object newValue)

eOpenSet

public void eOpenSet(EStructuralFeature eFeature,
                     java.lang.Object newValue)

eUnset

public void eUnset(EStructuralFeature eFeature)
Description copied from interface: EObject
Unsets the feature of the object.

If the feature is many-valued, the value must be an EList and that list is cleared. Otherwise, the value of the feature of the object is set to the feature's default value or the meta class's default value, as appropriate. If the feature is unsettable, the modeled state becomes unset. In any case, the feature will no longer be considered set.

Specified by:
eUnset in interface EObject
Parameters:
eFeature - the feature in question.
See Also:
EObject.eIsSet(EStructuralFeature), EObject.eSet(EStructuralFeature, Object), EObject.eGet(EStructuralFeature, boolean)

eUnset

public void eUnset(int featureID)
Description copied from interface: InternalEObject
Does the equivalent of eObject.eUnset(eObjecte.eClass().getEStructuralFeature(featureID)).

Specified by:
eUnset in interface InternalEObject
See Also:
EObject.eUnset(EStructuralFeature)

eDynamicUnset

public void eDynamicUnset(EStructuralFeature eFeature)

eDynamicUnset

public void eDynamicUnset(int featureID)

eDynamicUnset

protected void eDynamicUnset(int dynamicFeatureID,
                             EStructuralFeature eFeature)

eOpenUnset

public void eOpenUnset(EStructuralFeature eFeature)

eIsSet

public boolean eIsSet(EStructuralFeature eFeature)
Description copied from interface: EObject
Returns whether the feature of the object is considered to be set.

If the feature is many-valued, the value must be an EList and the feature is considered set if the list is not empty. If the feature is unsettable, the modeled state is directly available and is used. Otherwise, the unresolved value of the feature of the object is compared against the feature's default value or the meta class's default value, as appropriate; the feature is considered set if it's not the same as the default.

This property can affect serialization, since defaults are typically omitted in a compact serialization.

Specified by:
eIsSet in interface EObject
Parameters:
eFeature - the feature in question.
Returns:
whether the feature of the object is set.
See Also:
EObject.eSet(EStructuralFeature, Object), EObject.eUnset(EStructuralFeature), EObject.eGet(EStructuralFeature, boolean)

eIsSet

public boolean eIsSet(int featureID)
Description copied from interface: InternalEObject
Does the equivalent of eObject.eIsSet(eObjecte.eClass().getEStructuralFeature(featureID)).

Specified by:
eIsSet in interface InternalEObject
See Also:
EObject.eIsSet(EStructuralFeature)

eDynamicIsSet

public boolean eDynamicIsSet(EStructuralFeature eFeature)

eDynamicIsSet

public boolean eDynamicIsSet(int featureID)

eDynamicIsSet

protected boolean eDynamicIsSet(int dynamicFeatureID,
                                EStructuralFeature eFeature)

eOpenIsSet

public boolean eOpenIsSet(EStructuralFeature eFeature)

eBasicSetContainer

public NotificationChain eBasicSetContainer(InternalEObject newContainer,
                                            int newContainerFeatureID,
                                            NotificationChain msgs)
Description copied from interface: InternalEObject
Sets the container to be new container and appropriate feature. and returns accumulated notifications. Since the container feature may not be navigable, i.e., may not exist, the containment feature may be encoded instead.

Specified by:
eBasicSetContainer in interface InternalEObject
Returns:
accumulated notifications.

eBasicRemoveFromContainer

public NotificationChain eBasicRemoveFromContainer(NotificationChain msgs)
Description copied from interface: InternalEObject
Removes this object from whatever container holds it, and returns accumulated notifications.

Specified by:
eBasicRemoveFromContainer in interface InternalEObject
Returns:
accumulated notifications.

eBasicRemoveFromContainerFeature

public NotificationChain eBasicRemoveFromContainerFeature(NotificationChain msgs)

eDynamicBasicRemoveFromContainer

public NotificationChain eDynamicBasicRemoveFromContainer(NotificationChain msgs)

eInverseAdd

public NotificationChain eInverseAdd(InternalEObject otherEnd,
                                     int featureID,
                                     java.lang.Class<?> baseClass,
                                     NotificationChain msgs)
Description copied from interface: InternalEObject
Adds the object at the other end of a bidirectional reference to the appropriate feature and returns accumulated notifications.

Specified by:
eInverseAdd in interface InternalEObject
Returns:
accumulated notifications.

eInverseAdd

public NotificationChain eInverseAdd(InternalEObject otherEnd,
                                     int featureID,
                                     NotificationChain msgs)

eDynamicInverseAdd

public NotificationChain eDynamicInverseAdd(InternalEObject otherEnd,
                                            int featureID,
                                            java.lang.Class<?> inverseClass,
                                            NotificationChain msgs)

eDynamicInverseAdd

protected NotificationChain eDynamicInverseAdd(InternalEObject otherEnd,
                                               int featureID,
                                               NotificationChain msgs)

eInverseRemove

public NotificationChain eInverseRemove(InternalEObject otherEnd,
                                        int featureID,
                                        java.lang.Class<?> baseClass,
                                        NotificationChain msgs)
Description copied from interface: InternalEObject
Removes the object at the other end of a bidirectional reference from the appropriate feature and returns accumulated notifications.

Specified by:
eInverseRemove in interface InternalEObject
Returns:
accumulated notifications.

eInverseRemove

public NotificationChain eInverseRemove(InternalEObject otherEnd,
                                        int featureID,
                                        NotificationChain msgs)

eDynamicInverseRemove

public NotificationChain eDynamicInverseRemove(InternalEObject otherEnd,
                                               int featureID,
                                               java.lang.Class<?> inverseClass,
                                               NotificationChain msgs)

eDynamicInverseRemove

protected NotificationChain eDynamicInverseRemove(InternalEObject otherEnd,
                                                  int featureID,
                                                  NotificationChain msgs)

eProxyURI

public URI eProxyURI()
Description copied from interface: InternalEObject
Returns the proxy URI of this object. It can be used to resolve to the actual object.

Specified by:
eProxyURI in interface InternalEObject
Returns:
the proxy URI of this object.
See Also:
EcoreUtil.resolve(EObject, org.eclipse.emf.ecore.resource.ResourceSet), Resource.unload()

eSetProxyURI

public void eSetProxyURI(URI uri)
Description copied from interface: InternalEObject
Set the proxy URI of this object. It will be used to resolve to the actual object.

Specified by:
eSetProxyURI in interface InternalEObject
Parameters:
uri - the URI.
See Also:
EcoreUtil.resolve(EObject, org.eclipse.emf.ecore.resource.ResourceSet), Resource.unload()

eResolveProxy

public EObject eResolveProxy(InternalEObject proxy)
Description copied from interface: InternalEObject
Resolves the proxy object relative to this object.

Specified by:
eResolveProxy in interface InternalEObject
Returns:
the resolved object, or the original if the proxy can't be resolved.
See Also:
EcoreUtil.resolve(EObject,EObject)

eIsProxy

public boolean eIsProxy()
Description copied from interface: EObject
Indicates whether this object is a proxy.

A proxy is an object that is defined in a Resource that has not been loaded. An object may be a proxy either because proxy resolution was disabled when the object was accessed (see EObject.eGet(EStructuralFeature,boolean)) or because proxy resolution failed.

Specified by:
eIsProxy in interface EObject
Returns:
true if this object is a proxy or false, otherwise.
See Also:
Resource.unload(), EcoreUtil.resolve(EObject, org.eclipse.emf.ecore.resource.ResourceSet)

eBaseStructuralFeatureID

public int eBaseStructuralFeatureID(int derivedFeatureID,
                                    java.lang.Class<?> baseClass)
Description copied from interface: InternalEObject
Returns the feature ID relative to the base class, given a feature ID relative to this derived object's actual class.

Specified by:
eBaseStructuralFeatureID in interface InternalEObject
Parameters:
derivedFeatureID - the ID in the actual derived class
baseClass - the base class for which a relative ID is desired.
Returns:
the up-cast feature ID.

eDerivedStructuralFeatureID

public int eDerivedStructuralFeatureID(int baseFeatureID,
                                       java.lang.Class<?> baseClass)
Description copied from interface: InternalEObject
Returns the feature ID relative to this derived object's actual class, given a feature ID relative to the given base class.

Specified by:
eDerivedStructuralFeatureID in interface InternalEObject
Parameters:
baseFeatureID - the ID relative to a base class.
baseClass - the base class to which the ID is relative.
Returns:
the down-cast feature ID.

eDerivedStructuralFeatureID

public int eDerivedStructuralFeatureID(EStructuralFeature eStructuralFeature)

eClass

public EClass eClass()
Description copied from interface: EObject
Returns the meta class.

The meta class defines the features available for reflective access.

Specified by:
eClass in interface EObject
Returns:
the meta class.
See Also:
EClass.getEAllStructuralFeatures()

eStaticClass

protected EClass eStaticClass()

eDynamicClass

protected EClass eDynamicClass()

eSetClass

public void eSetClass(EClass eClass)
Description copied from interface: InternalEObject
Sets the meta class. An object with a set meta class is, by definition, a dynamic instance; it will support dynamic settings. an.

Specified by:
eSetClass in interface InternalEObject
Parameters:
eClass - the dynamic meta class.
See Also:
InternalEObject.eSetting(EStructuralFeature)

eSettingDelegate

protected EStructuralFeature.Internal.SettingDelegate eSettingDelegate(EStructuralFeature eFeature)

eSetting

public EStructuralFeature.Setting eSetting(EStructuralFeature eFeature)
Description copied from interface: InternalEObject
Returns a setting that can be used to access this object's feature.

Specified by:
eSetting in interface InternalEObject
Parameters:
eFeature - the feature of the desired setting.
Returns:
a setting that can be used to access this object's feature.

eStore

public InternalEObject.EStore eStore()
Description copied from interface: InternalEObject
Returns the store associated with this object.

Specified by:
eStore in interface InternalEObject
Returns:
the store associated with this object.

eSetStore

public void eSetStore(InternalEObject.EStore store)
Description copied from interface: InternalEObject
Set the store associated with this object. Most objects will not support this.

Specified by:
eSetStore in interface InternalEObject
Parameters:
store - the store to associate with this object.

eVirtualBitCount

protected static int eVirtualBitCount(int value)
Returns the number of bits that are on in the two's complement bit pattern. This is used to maintain the bit set representing which feature IDs currently have and index allocated in the virtual values.

Parameters:
value - a two's complement bit pattern.
Returns:
the number of bits that are on.

eVirtualIndexBits

protected int eVirtualIndexBits(int offset)
Returns the bit pattern at the given offset within the sequence of bit patterns representing which features are assigned an index in the virtual values.

Parameters:
offset - the offset within the bit sequence of bit patterns.
Returns:
the bit pattern at the offset.

eSetVirtualIndexBits

protected void eSetVirtualIndexBits(int offset,
                                    int newIndexBits)
Sets the bit pattern at the given offset within the sequence of bit patterns representing which features are assigned an index in the virtual values.

Parameters:
offset - the offset within the bit sequence of bit patterns.
newIndexBits - the new bit pattern at the offset.

eVirtualIndex

protected int eVirtualIndex(int eDerivedStructuralFeatureID,
                            int action)
Returns the index in the virtual values for the feature ID, with the side effect of toggling the necessary bits to suit the action code. A result of less than zero indicates that the feature ID is not assigned an index. In the case of a set action, when the value was not previously set, the result will be the complement of the assigned index, which can be corrected by ~index.

Parameters:
eDerivedStructuralFeatureID - the ID of a feature of the class.
action - the reason for computing the ID.
Returns:
the virtual index.

eVirtualValues

protected java.lang.Object[] eVirtualValues()
Returns the array of virtual values of the features that are current set.

Returns:
the array of virtual values of the features that are current set.

eSetVirtualValues

protected void eSetVirtualValues(java.lang.Object[] newValues)
Sets the array of virtual values of the features that are current set.

Parameters:
newValues - the new array of virtual values.

eVirtualValue

protected java.lang.Object eVirtualValue(int index)
Returns the value at the index.

Parameters:
index - the index in the virtual values.
Returns:
the value at the index.

eSetVirtualValue

protected java.lang.Object eSetVirtualValue(int index,
                                            java.lang.Object value)
Sets the value at the index.

Parameters:
index - the index in the virtual values.
Returns:
the previous value at the index.

eComputeVirtualValuesCapacity

protected int eComputeVirtualValuesCapacity(int minimumCapacity)
This method controls the growth of the virtual values by returning the new capacity that should be allocated for the given minimum required capacity. Subclasses can override this to be more or less liberal in growth.

Parameters:
minimumCapacity - the minimum number of virtual value entries required.
Returns:
the actual number of entries to allocate space for, including a growth factor.

eAddVirtualValue

protected void eAddVirtualValue(int index,
                                java.lang.Object value)
Adds the value at the index.

Parameters:
index - the index in the virtual values.

eRemoveVirtualValue

protected java.lang.Object eRemoveVirtualValue(int index)
Removes the value at the index.

Parameters:
index - the index in the virtual values.
Returns:
the value at the index.

eVirtualGet

public java.lang.Object eVirtualGet(int eDerivedStructuralFeatureID)
Returns the value for the feature ID, or null, if there isn't one.

Parameters:
eDerivedStructuralFeatureID - the feature ID to fetch.
Returns:
the value for the feature ID.

eVirtualGet

public java.lang.Object eVirtualGet(int eDerivedStructuralFeatureID,
                                    java.lang.Object defaultValue)
Returns the value for the feature ID, or the default value, if there isn't one.

Parameters:
eDerivedStructuralFeatureID - the feature ID to fetch.
defaultValue - the default value.
Returns:
the value for the feature ID.

eVirtualIsSet

public boolean eVirtualIsSet(int eDerivedStructuralFeatureID)
Returns whether there is a value set for the feature ID.

Parameters:
eDerivedStructuralFeatureID - the feature ID to test.
Returns:
whether there is a value set for the feature ID.

eVirtualSet

public java.lang.Object eVirtualSet(int eDerivedStructuralFeatureID,
                                    java.lang.Object value)
Sets the value for the feature ID.

Parameters:
eDerivedStructuralFeatureID - the feature ID to set.
Returns:
the previous value for the feature ID or EVIRTUAL_NO_VALUE.

eVirtualUnset

public java.lang.Object eVirtualUnset(int eDerivedStructuralFeatureID)
Unsets the value for the feature ID.

Parameters:
eDerivedStructuralFeatureID - the feature ID to unset.
Returns:
the previous value for the feature ID or EVIRTUAL_NO_VALUE.

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

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