|
|||||||||
PREV CLASS SOURCE NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.eclipse.emf.common.notify.impl.NotifierImpl | +--org.eclipse.emf.ecore.impl.EObjectImpl
An implementation of the model object 'EObject'.
Inner Class Summary | |
protected static interface |
EObjectImpl.EPropertiesHolder
An internal interface for holding less frequently members variables. |
protected static class |
EObjectImpl.EPropertiesHolderImpl
An internal class for holding less frequently members variables. |
Field Summary | |
protected InternalEObject |
eContainer
|
protected int |
eContainerFeatureID
|
static int |
ELAST_EOBJECT_FLAG
This is unused, but we can reserve bits with eFlags. |
protected EObjectImpl.EPropertiesHolder |
eProperties
|
Fields inherited from class org.eclipse.emf.common.notify.impl.NotifierImpl |
eAdapters, EDELIVER, eFlags, ELAST_NOTIFIER_FLAG |
Fields inherited from interface org.eclipse.emf.ecore.InternalEObject |
EOPPOSITE_FEATURE_BASE |
Constructor Summary | |
protected |
EObjectImpl()
Creates an EObject. |
Method Summary | |
TreeIterator |
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. |
NotificationChain |
eBasicRemoveFromContainer(NotificationChain msgs)
Removes this object from whatever container holds it, and returns accumulated notifications. |
NotificationChain |
eBasicSetContainer(InternalEObject newContainer,
int newContainerFeatureID,
NotificationChain msgs)
Sets the container to be new container and appropriate feature. |
EClass |
eClass()
Returns the meta class. |
EObject |
eContainer()
Returns the containing object, or null . |
int |
eContainerFeatureID()
Returns the container feature ID. |
EReference |
eContainmentFeature()
Returns the particular feature
of the container that actually contains the object,
or null , if there is no container. |
boolean |
eContains(EObject eObject)
|
EList |
eContents()
Returns a list view of the content objects; it is unmodifiable. |
EList |
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. |
protected Resource.Internal |
eDirectResource()
|
NotificationChain |
eDynamicBasicRemoveFromContainer(NotificationChain msgs)
|
protected int |
eDynamicFeatureID(EStructuralFeature eStructuralFeature)
|
java.lang.Object |
eDynamicGet(EStructuralFeature eFeature,
boolean resolve)
|
NotificationChain |
eDynamicInverseAdd(InternalEObject otherEnd,
int featureID,
java.lang.Class inverseClass,
NotificationChain msgs)
|
NotificationChain |
eDynamicInverseRemove(InternalEObject otherEnd,
int featureID,
java.lang.Class inverseClass,
NotificationChain msgs)
|
boolean |
eDynamicIsSet(EStructuralFeature eFeature)
|
void |
eDynamicSet(EStructuralFeature eFeature,
java.lang.Object newValue)
|
void |
eDynamicUnset(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. |
protected boolean |
eHasSettings()
|
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 |
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. |
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. |
EObject |
eObjectForURIFragmentSegment(java.lang.String uriFragmentSegment)
Returns the object resolved by the fragment segment. |
protected EObjectImpl.EPropertiesHolder |
eProperties()
|
URI |
eProxyURI()
Returns the proxy URI of 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 |
eSetClass(EClass eClass)
Sets the meta class. |
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. |
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 EClass |
eStaticClass()
|
protected int |
eStaticFeatureCount()
|
void |
eUnset(EStructuralFeature eFeature)
Unsets the feature of the object. |
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. |
java.lang.String |
toString()
|
Methods inherited from class org.eclipse.emf.common.notify.impl.NotifierImpl |
eAdapters, 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.common.notify.Notifier |
eAdapters, eDeliver, eNotify, eSetDeliver |
Methods inherited from interface org.eclipse.emf.ecore.InternalEObject |
eNotificationRequired |
Field Detail |
public static final int ELAST_EOBJECT_FLAG
protected InternalEObject eContainer
protected int eContainerFeatureID
protected EObjectImpl.EPropertiesHolder eProperties
Constructor Detail |
protected EObjectImpl()
Method Detail |
protected int eStaticFeatureCount()
protected EObjectImpl.EPropertiesHolder eProperties()
protected boolean eHasSettings()
protected EStructuralFeature.Internal.DynamicValueHolder eSettings()
protected int eDynamicFeatureID(EStructuralFeature eStructuralFeature)
public java.lang.String eURIFragmentSegment(EStructuralFeature eStructuralFeature, EObject eObject)
InternalEObject
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.
eURIFragmentSegment
in interface InternalEObject
org.eclipse.emf.ecore.InternalEObject
eFeature
- the feature relating the given object to this object, or null
.eObject
- the object to be identified.public EObject eObjectForURIFragmentSegment(java.lang.String uriFragmentSegment)
InternalEObject
The fragment segment encoding will typically be of the form returned by eURIFragmentSegment
.
eObjectForURIFragmentSegment
in interface InternalEObject
org.eclipse.emf.ecore.InternalEObject
uriFragment
- a fragment segment.public boolean eContains(EObject eObject)
public EObject eContainer()
EObject
null
.
An object is contained by another object
if it appears in the contents
of that object.
The object will be contained by a particular feature
of the containing object.
eContainer
in interface EObject
org.eclipse.emf.ecore.EObject
EObject.eResource()
,
EcoreUtil.remove(EObject)
,
EObject.eContainmentFeature()
,
EcoreUtil.getRootContainer(org.eclipse.emf.ecore.EObject)
,
EObject.eContents()
public int eContainerFeatureID()
InternalEObject
eContainerFeatureID
in interface InternalEObject
org.eclipse.emf.ecore.InternalEObject
EObject.eContainmentFeature()
,
InternalEObject.EOPPOSITE_FEATURE_BASE
public EList eContents()
EObject
This will be the list of EObject
s 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.
eContents
in interface EObject
org.eclipse.emf.ecore.EObject
EObject.eContainer()
,
EClass.getEAllContainments()
,
EObject.eGet(EStructuralFeature)
,
EcoreUtil.remove(EObject)
,
EObject.eAllContents()
public EList eCrossReferences()
EObject
This will be the list of EObject
s 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(); ... }
eCrossReferences
in interface EObject
org.eclipse.emf.ecore.EObject
EObject.eContents()
,
EClass.getEAllReferences()
,
EClass.getEAllContainments()
,
EObject.eGet(EStructuralFeature)
,
EcoreUtil.CrossReferencer
public TreeIterator eAllContents()
EObject
direct contents
and indirect contents of this object.eAllContents
in interface EObject
org.eclipse.emf.ecore.EObject
Resource.getAllContents()
,
EcoreUtil.getAllContents(java.util.Collection)
public EReference eContainmentFeature()
EObject
feature
of the container
that actually contains the object,
or null
, if there is no container.
eContainmentFeature
in interface EObject
org.eclipse.emf.ecore.EObject
EObject.eContainer()
,
EClass.getEAllContainments()
protected Resource.Internal eDirectResource()
public Resource eResource()
EObject
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
.
eResource
in interface EObject
org.eclipse.emf.ecore.EObject
EcoreUtil.remove(EObject)
,
EObject.eContainer()
public Resource.Internal eInternalResource()
InternalEObject
null
.eInternalResource
in interface InternalEObject
org.eclipse.emf.ecore.InternalEObject
EObject.eResource()
public NotificationChain eSetResource(Resource.Internal resource, NotificationChain notifications)
InternalEObject
Resource.getContents()
.add(this)
.eSetResource
in interface InternalEObject
org.eclipse.emf.ecore.InternalEObject
public java.lang.Object eGet(EStructuralFeature eFeature)
EObject
It returns the resolved value, i.e., it returns
eObject.eGet
(feature, true)
eGet
in interface EObject
org.eclipse.emf.ecore.EObject
feature
- the feature of the value to fetch.EObject.eGet(EStructuralFeature, boolean)
public java.lang.Object eGet(EStructuralFeature eFeature, boolean resolve)
EObject
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.
eGet
in interface EObject
org.eclipse.emf.ecore.EObject
feature
- the feature of the value to fetch.resolve
- whether to resolve.java.lang.IllegalArgumentException
- if the feature is not one the meta class
's
features
.InternalEList.basicIterator()
,
InternalEList.basicList()
,
EcoreUtil.resolve(EObject, ResourceSet)
,
EObject.eSet(EStructuralFeature, Object)
,
EObject.eUnset(EStructuralFeature)
,
EObject.eIsSet(EStructuralFeature)
,
EObject.eGet(EStructuralFeature)
public java.lang.Object eDynamicGet(EStructuralFeature eFeature, boolean resolve)
public void eSet(EStructuralFeature eFeature, java.lang.Object newValue)
EObject
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.
Otherwise 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.
eSet
in interface EObject
org.eclipse.emf.ecore.EObject
feature
- the feature of the value to set.java.lang.IllegalArgumentException
- if the feature is not one the meta class
's
features
,
or it isn't changeable
.java.lang.ClassCastException
- if there is a type conflict.ArrayStoreException
- if there is a type conflect.EObject.eUnset(EStructuralFeature)
,
EObject.eIsSet(EStructuralFeature)
,
EObject.eGet(EStructuralFeature, boolean)
public void eDynamicSet(EStructuralFeature eFeature, java.lang.Object newValue)
public void eUnset(EStructuralFeature eFeature)
EObject
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
.
eUnset
in interface EObject
org.eclipse.emf.ecore.EObject
feature
- the feature in question.java.lang.IllegalArgumentException
- if the feature is not one the meta class
's
features
,
or it isn't changeable
.EObject.eIsSet(EStructuralFeature)
,
EObject.eSet(EStructuralFeature, Object)
,
EObject.eGet(EStructuralFeature, boolean)
public void eDynamicUnset(EStructuralFeature eFeature)
public boolean eIsSet(EStructuralFeature eFeature)
EObject
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.
eIsSet
in interface EObject
org.eclipse.emf.ecore.EObject
feature
- the feature in question.java.lang.IllegalArgumentException
- if the feature is not one the meta class
's
features
.EObject.eSet(EStructuralFeature, Object)
,
EObject.eUnset(EStructuralFeature)
,
EObject.eGet(EStructuralFeature, boolean)
public boolean eDynamicIsSet(EStructuralFeature eFeature)
public NotificationChain eBasicSetContainer(InternalEObject newContainer, int newContainerFeatureID, NotificationChain msgs)
InternalEObject
eBasicSetContainer
in interface InternalEObject
org.eclipse.emf.ecore.InternalEObject
public NotificationChain eBasicRemoveFromContainer(NotificationChain msgs)
InternalEObject
eBasicRemoveFromContainer
in interface InternalEObject
org.eclipse.emf.ecore.InternalEObject
public NotificationChain eDynamicBasicRemoveFromContainer(NotificationChain msgs)
public NotificationChain eInverseAdd(InternalEObject otherEnd, int featureID, java.lang.Class baseClass, NotificationChain msgs)
InternalEObject
eInverseAdd
in interface InternalEObject
org.eclipse.emf.ecore.InternalEObject
public NotificationChain eDynamicInverseAdd(InternalEObject otherEnd, int featureID, java.lang.Class inverseClass, NotificationChain msgs)
public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, java.lang.Class baseClass, NotificationChain msgs)
InternalEObject
eInverseRemove
in interface InternalEObject
org.eclipse.emf.ecore.InternalEObject
public NotificationChain eDynamicInverseRemove(InternalEObject otherEnd, int featureID, java.lang.Class inverseClass, NotificationChain msgs)
public URI eProxyURI()
InternalEObject
resolve
to the actual object.eProxyURI
in interface InternalEObject
org.eclipse.emf.ecore.InternalEObject
EcoreUtil.resolve(EObject, ResourceSet)
,
Resource.unload()
public void eSetProxyURI(URI uri)
InternalEObject
resolve
to the actual object.eSetProxyURI
in interface InternalEObject
org.eclipse.emf.ecore.InternalEObject
uri
- the URI.EcoreUtil.resolve(EObject, ResourceSet)
,
Resource.unload()
public boolean eIsProxy()
EObject
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.
eIsProxy
in interface EObject
org.eclipse.emf.ecore.EObject
true
if this object is a proxy or false
, otherwise.Resource.unload()
,
EcoreUtil.resolve(EObject, ResourceSet)
public int eBaseStructuralFeatureID(int derivedFeatureID, java.lang.Class baseClass)
InternalEObject
eBaseStructuralFeatureID
in interface InternalEObject
org.eclipse.emf.ecore.InternalEObject
derivedFeatureID
- the ID in the actual derived classbaseClass
- the base class for which a relative ID is desired.public int eDerivedStructuralFeatureID(int baseFeatureID, java.lang.Class baseClass)
InternalEObject
eDerivedStructuralFeatureID
in interface InternalEObject
org.eclipse.emf.ecore.InternalEObject
baseFeatureID
- the ID relative to a base class.baseClass
- the base class to which the ID is relative.public int eDerivedStructuralFeatureID(EStructuralFeature eStructuralFeature)
public EClass eClass()
EObject
The meta class defines the features
available for reflective access.
eClass
in interface EObject
org.eclipse.emf.ecore.EObject
EClass.getEAllStructuralFeatures()
protected EClass eStaticClass()
public void eSetClass(EClass eClass)
InternalEObject
settings
.
an.eSetClass
in interface InternalEObject
org.eclipse.emf.ecore.InternalEObject
eClass
- the dynamic meta class.InternalEObject.eSetting(EStructuralFeature)
protected EStructuralFeature.Internal.SettingDelegate eSettingDelegate(EStructuralFeature eFeature)
public EStructuralFeature.Setting eSetting(EStructuralFeature eFeature)
InternalEObject
eSetting
in interface InternalEObject
org.eclipse.emf.ecore.InternalEObject
feature
- the feature of the desired setting.public java.lang.String toString()
toString
in class java.lang.Object
|
Copyright 2001-2003 IBM Corporation and others. All Rights Reserved. |
||||||||
PREV CLASS SOURCE NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |