org.eclipse.emf.ecore.impl
Class MinimalEObjectImpl

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

public class MinimalEObjectImpl
extends BasicEObjectImpl
implements EObject, EStructuralFeature.Internal.DynamicValueHolder

A space compact implementation of the model object 'EObject'.


Nested Class Summary
static class MinimalEObjectImpl.Container
           
 
Nested classes/interfaces inherited from class org.eclipse.emf.ecore.impl.BasicEObjectImpl
BasicEObjectImpl.EPropertiesHolder, BasicEObjectImpl.EPropertiesHolderBaseImpl, BasicEObjectImpl.EPropertiesHolderImpl
 
Nested classes/interfaces inherited from class org.eclipse.emf.common.notify.impl.BasicNotifierImpl
BasicNotifierImpl.EAdapterList<E extends java.lang.Object & Adapter>, BasicNotifierImpl.EObservableAdapterList
 
Nested classes/interfaces inherited from interface org.eclipse.emf.ecore.InternalEObject
InternalEObject.EStore
 
Field Summary
 
Fields inherited from class org.eclipse.emf.ecore.impl.BasicEObjectImpl
EVIRTUAL_GET, EVIRTUAL_IS_SET, EVIRTUAL_NO_VALUE, EVIRTUAL_SET, EVIRTUAL_UNSET
 
Fields inherited from interface org.eclipse.emf.ecore.EStructuralFeature.Internal.DynamicValueHolder
NIL
 
Fields inherited from interface org.eclipse.emf.ecore.InternalEObject
EOPPOSITE_FEATURE_BASE
 
Constructor Summary
protected MinimalEObjectImpl()
          Creates a minimal EObject.
 
Method Summary
 java.lang.Object dynamicGet(int dynamicFeatureID)
          Returns the value of the feature.
 void dynamicSet(int dynamicFeatureID, java.lang.Object newValue)
          Sets the value of the feature to the new value.
 void dynamicUnset(int dynamicFeatureID)
          Unsets the value of the feature.
 EList<Adapter> eAdapters()
          Returns list of the adapters associated with this notifier.
protected  Adapter[] eBasicAdapterArray()
          Returns the underlying array of adapters.
protected  BasicEList<Adapter> eBasicAdapters()
          Returns the adapter list, even if it is null.
protected  boolean eBasicHasAdapters()
          Returns whether there are any adapters.
protected  BasicEObjectImpl.EPropertiesHolder eBasicProperties()
           
protected  void eBasicSetAdapterArray(Adapter[] eAdapters)
           
protected  void eBasicSetContainer(InternalEObject newContainer)
           
protected  void eBasicSetContainer(InternalEObject newContainer, int newContainerFeatureID)
           
protected  void eBasicSetContainerFeatureID(int newContainerFeatureID)
           
protected  void eBasicSetSettings(java.lang.Object[] settings)
           
protected  java.lang.Object[] eBasicSettings()
           
 EClass eClass()
          Returns the meta class.
 int eContainerFeatureID()
          Returns the container feature ID.
 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.
 boolean eDeliver()
          Returns whether this notifier will deliver notifications to the adapters.
 Resource.Internal eDirectResource()
          Returns the directly containing internal resource, or null.
protected  EClass eDynamicClass()
           
protected  boolean eHasSettings()
           
 InternalEObject eInternalContainer()
          Returns the internal container, or null.
 boolean eIsProxy()
          Indicates whether this object is a proxy.
protected  BasicEObjectImpl.EPropertiesHolder eProperties()
           
 URI eProxyURI()
          Returns the proxy URI of this object.
 void eSetClass(EClass eClass)
          Sets the meta class.
 void eSetDeliver(boolean deliver)
          Sets whether this notifier will deliver notifications to the adapters.
protected  void eSetDirectResource(Resource.Internal resource)
           
 void eSetProxyURI(URI uri)
          Set the proxy URI of this object.
protected  EStructuralFeature.Internal.DynamicValueHolder eSettings()
           
 
Methods inherited from class org.eclipse.emf.ecore.impl.BasicEObjectImpl
eAddVirtualValue, eAllContents, eBaseStructuralFeatureID, eBasicRemoveFromContainer, eBasicRemoveFromContainerFeature, eBasicSetContainer, eComputeVirtualValuesCapacity, eContainer, eContainerAdapterArray, eContainingFeature, eContainmentFeature, eContainmentFeature, eContains, eDerivedOperationID, eDerivedOperationID, eDerivedStructuralFeatureID, eDerivedStructuralFeatureID, eDynamicBasicRemoveFromContainer, eDynamicFeature, eDynamicFeatureID, eDynamicGet, eDynamicGet, eDynamicGet, eDynamicInverseAdd, eDynamicInverseAdd, eDynamicInverseRemove, eDynamicInverseRemove, eDynamicInvoke, eDynamicInvoke, eDynamicIsSet, eDynamicIsSet, eDynamicIsSet, eDynamicSet, eDynamicSet, eDynamicSet, eDynamicUnset, eDynamicUnset, eDynamicUnset, eGet, eGet, eGet, eGet, eInternalResource, eInverseAdd, eInverseAdd, eInverseRemove, eInverseRemove, eInvocationDelegate, eInvoke, eInvoke, eIsSet, eIsSet, eObjectForURIFragmentSegment, eOpenGet, eOpenIsSet, eOpenSet, eOpenUnset, eRemoveVirtualValue, eResolveProxy, eResource, eSet, eSet, eSetResource, eSetStore, eSetting, eSettingDelegate, eSetVirtualIndexBits, eSetVirtualValue, eSetVirtualValues, eStaticClass, eStaticFeatureCount, eStaticOperationCount, eStore, eUnset, eUnset, eURIFragmentSegment, eVirtualBitCount, eVirtualGet, eVirtualGet, eVirtualIndex, eVirtualIndexBits, eVirtualIsSet, eVirtualSet, eVirtualUnset, eVirtualValue, eVirtualValues, toString
 
Methods inherited from class org.eclipse.emf.common.notify.impl.BasicNotifierImpl
eNotificationRequired, eNotify
 
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.EObject
eAllContents, eContainer, eContainingFeature, eContainmentFeature, eGet, eGet, eInvoke, eIsSet, eResource, eSet, eUnset
 
Methods inherited from interface org.eclipse.emf.common.notify.Notifier
eNotify
 
Methods inherited from interface org.eclipse.emf.ecore.InternalEObject
eNotificationRequired
 

Constructor Detail

MinimalEObjectImpl

protected MinimalEObjectImpl()
Creates a minimal EObject.

Method Detail

eProperties

protected BasicEObjectImpl.EPropertiesHolder eProperties()
Overrides:
eProperties in class BasicEObjectImpl

eBasicProperties

protected BasicEObjectImpl.EPropertiesHolder eBasicProperties()
Overrides:
eBasicProperties in class BasicEObjectImpl

eBasicAdapters

protected BasicEList<Adapter> eBasicAdapters()
Description copied from class: BasicNotifierImpl
Returns the adapter list, even if it is null.

Overrides:
eBasicAdapters in class BasicNotifierImpl
Returns:
the adapter list, even if it is null.

eAdapters

public EList<Adapter> eAdapters()
Description copied from interface: Notifier
Returns list of the adapters associated with this notifier.

Specified by:
eAdapters in interface Notifier
Overrides:
eAdapters in class BasicNotifierImpl
Returns:
the adapters associated with this notifier.

eBasicAdapterArray

protected Adapter[] eBasicAdapterArray()
Description copied from class: BasicNotifierImpl
Returns the underlying array of adapters. The length of this array reflects exactly the number of adapters where null represents the lack of any adapters. This array may not be modified by the caller and must be guaranteed not to be modified even if the list of adapters is modified.

Overrides:
eBasicAdapterArray in class BasicNotifierImpl
Returns:
the underlying array of adapters.

eBasicSetAdapterArray

protected void eBasicSetAdapterArray(Adapter[] eAdapters)

eBasicHasAdapters

protected boolean eBasicHasAdapters()
Description copied from class: BasicNotifierImpl
Returns whether there are any adapters.

Overrides:
eBasicHasAdapters in class BasicNotifierImpl
Returns:
whether there are any adapters.

eDeliver

public boolean eDeliver()
Description copied from interface: Notifier
Returns whether this notifier will deliver notifications to the adapters.

Specified by:
eDeliver in interface Notifier
Overrides:
eDeliver in class BasicNotifierImpl
Returns:
whether notifications will be delivered.
See Also:
Notifier.eSetDeliver(boolean)

eSetDeliver

public void eSetDeliver(boolean deliver)
Description copied from interface: Notifier
Sets whether this notifier will deliver notifications to the adapters.

Specified by:
eSetDeliver in interface Notifier
Overrides:
eSetDeliver in class BasicNotifierImpl
Parameters:
deliver - whether or not to deliver.
See Also:
Notifier.eDeliver()

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
Overrides:
eIsProxy in class BasicEObjectImpl
Returns:
true if this object is a proxy or false, otherwise.
See Also:
Resource.unload(), EcoreUtil.resolve(EObject, org.eclipse.emf.ecore.resource.ResourceSet)

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
Overrides:
eProxyURI in class BasicEObjectImpl
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
Overrides:
eSetProxyURI in class BasicEObjectImpl
Parameters:
uri - the URI.
See Also:
EcoreUtil.resolve(EObject, org.eclipse.emf.ecore.resource.ResourceSet), Resource.unload()

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
Overrides:
eInternalContainer in class BasicEObjectImpl
Returns:
the internal container.
See Also:
EObject.eContainer(), InternalEObject.eDirectResource()

eBasicSetContainer

protected void eBasicSetContainer(InternalEObject newContainer)

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
Overrides:
eContainerFeatureID in class BasicEObjectImpl
Returns:
the container feature ID.
See Also:
EObject.eContainmentFeature(), InternalEObject.EOPPOSITE_FEATURE_BASE

eBasicSetContainerFeatureID

protected void eBasicSetContainerFeatureID(int newContainerFeatureID)

eBasicSetContainer

protected void eBasicSetContainer(InternalEObject newContainer,
                                  int newContainerFeatureID)
Overrides:
eBasicSetContainer in class BasicEObjectImpl

eDynamicClass

protected EClass eDynamicClass()
Overrides:
eDynamicClass in class BasicEObjectImpl

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
Overrides:
eClass in class BasicEObjectImpl
Returns:
the meta class.
See Also:
EClass.getEAllStructuralFeatures()

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
Overrides:
eSetClass in class BasicEObjectImpl
Parameters:
eClass - the dynamic meta class.
See Also:
InternalEObject.eSetting(EStructuralFeature)

eHasSettings

protected boolean eHasSettings()
Overrides:
eHasSettings in class BasicEObjectImpl

eBasicSettings

protected java.lang.Object[] eBasicSettings()

eBasicSetSettings

protected void eBasicSetSettings(java.lang.Object[] settings)

eSettings

protected EStructuralFeature.Internal.DynamicValueHolder eSettings()
Overrides:
eSettings in class BasicEObjectImpl

eDirectResource

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

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

eSetDirectResource

protected void eSetDirectResource(Resource.Internal resource)
Overrides:
eSetDirectResource in class BasicEObjectImpl

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
Overrides:
eContents in class BasicEObjectImpl
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
Overrides:
eCrossReferences in class BasicEObjectImpl
Returns:
a list view of the cross referenced objects.
See Also:
EObject.eContents(), EClass.getEAllReferences(), EClass.getEAllContainments(), EObject.eGet(EStructuralFeature), EcoreUtil.CrossReferencer

dynamicGet

public java.lang.Object dynamicGet(int dynamicFeatureID)
Description copied from interface: EStructuralFeature.Internal.DynamicValueHolder
Returns the value of the feature.

Specified by:
dynamicGet in interface EStructuralFeature.Internal.DynamicValueHolder
Parameters:
dynamicFeatureID - the feature's index in the cached dynamic values.
Returns:
the value of the feature.

dynamicSet

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

Specified by:
dynamicSet in interface EStructuralFeature.Internal.DynamicValueHolder
Parameters:
dynamicFeatureID - the feature's index in the cached dynamic values.
newValue - the new value for the feature.

dynamicUnset

public void dynamicUnset(int dynamicFeatureID)
Description copied from interface: EStructuralFeature.Internal.DynamicValueHolder
Unsets the value of the feature.

Specified by:
dynamicUnset in interface EStructuralFeature.Internal.DynamicValueHolder
Parameters:
dynamicFeatureID - the feature's index in the cached dynamic values.

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