protected FeatureMap createFeatureMap(EStructuralFeature eStructuralFeature) { return new EStoreEObjectImpl.EStoreFeatureMap(this, eStructuralFeature, eStore()); }
/** * Returns the container as {@link org.eclipse.emf.ecore.InternalEObject.EStore#getContainer(InternalEObject) provided} by the store. */ @Override public InternalEObject eInternalContainer() { return eStore().getContainer(this); }
/** * Returns the container as {@link InternalEObject.EStore#getContainer(InternalEObject) provided} by the store. */ @Override public InternalEObject eInternalContainer() { return eStore().getContainer(this); }
protected FeatureMap createFeatureMap(EStructuralFeature eStructuralFeature) { return new EStoreEObjectImpl.EStoreFeatureMap(this, eStructuralFeature, eStore()); }
@Override public void dynamicUnset(int dynamicFeatureID) { Object[] eSettings = eDynamicSettings(); EStructuralFeature eStructuralFeature = eDynamicFeature(dynamicFeatureID); if (eStructuralFeature.isTransient()) { eSettings[dynamicFeatureID] = null; } else { eStore().unset(this, eStructuralFeature); eSettings[dynamicFeatureID] = null; } }
@Override public void dynamicUnset(int dynamicFeatureID) { Object[] eSettings = eDynamicSettings(); EStructuralFeature eStructuralFeature = eDynamicFeature(dynamicFeatureID); if (eStructuralFeature.isTransient()) { eSettings[dynamicFeatureID] = null; } else { eStore().unset(this, eStructuralFeature); eSettings[dynamicFeatureID] = null; } }
/** * Returns the container feature ID as computed from the container feature {@link org.eclipse.emf.ecore.InternalEObject.EStore#getContainingFeature(InternalEObject) provided} by the store. */ @Override public int eContainerFeatureID() { EObject eContainer = eInternalContainer(); if (eContainer != null) { EStructuralFeature eContainingFeature = eStore().getContainingFeature(this); if (eContainingFeature instanceof EReference) { EReference eContainingReference = (EReference)eContainingFeature; EReference eOpposite = eContainingReference.getEOpposite(); if (eOpposite != null) { return eClass().getFeatureID(eOpposite); } } return EOPPOSITE_FEATURE_BASE - eContainer.eClass().getFeatureID(eContainingFeature); } return 0; }
@Override protected boolean eDynamicIsSet(int dynamicFeatureID, EStructuralFeature eFeature) { return dynamicFeatureID < 0 ? eOpenIsSet(eFeature) : eFeature.isTransient() ? eSettingDelegate(eFeature).dynamicIsSet(this, eSettings(), dynamicFeatureID) : eStore().isSet(this, eFeature); }
@Override public void dynamicSet(int dynamicFeatureID, Object value) { Object[] eSettings = eDynamicSettings(); EStructuralFeature eStructuralFeature = eDynamicFeature(dynamicFeatureID); if (eStructuralFeature.isTransient()) { eSettings[dynamicFeatureID] = value; } else { eStore().set(this, eStructuralFeature, InternalEObject.EStore.NO_INDEX, value); if (eIsCaching()) { eSettings[dynamicFeatureID] = value; } } }
@Override protected boolean eDynamicIsSet(int dynamicFeatureID, EStructuralFeature eFeature) { return dynamicFeatureID < 0 ? eOpenIsSet(eFeature) : eFeature.isTransient() ? eSettingDelegate(eFeature).dynamicIsSet(this, eSettings(), dynamicFeatureID) : eStore().isSet(this, eFeature); }
@Override public void dynamicSet(int dynamicFeatureID, Object value) { Object[] eSettings = eDynamicSettings(); EStructuralFeature eStructuralFeature = eDynamicFeature(dynamicFeatureID); if (eStructuralFeature.isTransient()) { eSettings[dynamicFeatureID] = value; } else { eStore().set(this, eStructuralFeature, InternalEObject.EStore.NO_INDEX, value); if (eIsCaching()) { eSettings[dynamicFeatureID] = value; } } }
/** * Returns the container feature ID as computed from the container feature {@link InternalEObject.EStore#getContainingFeature(InternalEObject) provided} by the store. */ @Override public int eContainerFeatureID() { EObject eContainer = eInternalContainer(); if (eContainer != null) { EStructuralFeature eContainingFeature = eStore().getContainingFeature(this); if (eContainingFeature instanceof EReference) { EReference eContainingReference = (EReference)eContainingFeature; EReference eOpposite = eContainingReference.getEOpposite(); if (eOpposite != null) { return eClass().getFeatureID(eOpposite); } } return EOPPOSITE_FEATURE_BASE - eContainer.eClass().getFeatureID(eContainingFeature); } return 0; }
@Override public Object dynamicGet(int dynamicFeatureID) { Object[] eSettings = eDynamicSettings(); Object result = eSettings[dynamicFeatureID]; if (result == null) { EStructuralFeature eStructuralFeature = eDynamicFeature(dynamicFeatureID); if (!eStructuralFeature.isTransient()) { if (FeatureMapUtil.isFeatureMap(eStructuralFeature)) { eSettings[dynamicFeatureID] = result = createFeatureMap(eStructuralFeature); } else if (eStructuralFeature.isMany()) { eSettings[dynamicFeatureID] = result = createList(eStructuralFeature); } else { result = eStore().get(this, eStructuralFeature, InternalEObject.EStore.NO_INDEX); if (eIsCaching()) { eSettings[dynamicFeatureID] = result; } } } } return result; }
@Override public Object dynamicGet(int dynamicFeatureID) { Object[] eSettings = eDynamicSettings(); Object result = eSettings[dynamicFeatureID]; if (result == null) { EStructuralFeature eStructuralFeature = eDynamicFeature(dynamicFeatureID); if (!eStructuralFeature.isTransient()) { if (FeatureMapUtil.isFeatureMap(eStructuralFeature)) { eSettings[dynamicFeatureID] = result = createFeatureMap(eStructuralFeature); } else if (eStructuralFeature.isMany()) { eSettings[dynamicFeatureID] = result = createList(eStructuralFeature); } else { result = eStore().get(this, eStructuralFeature, InternalEObject.EStore.NO_INDEX); if (eIsCaching()) { eSettings[dynamicFeatureID] = result; } } } } return result; }