/** * generated by Xtext 2.13.0 */ package com.minres.rdl.rdl.impl; import com.minres.rdl.rdl.ComponentDefinition; import com.minres.rdl.rdl.EnumDefinition; import com.minres.rdl.rdl.Include; import com.minres.rdl.rdl.Instantiation; import com.minres.rdl.rdl.PropertyAssignment; import com.minres.rdl.rdl.PropertyDefinition; import com.minres.rdl.rdl.RdlPackage; import com.minres.rdl.rdl.Root; import java.util.Collection; import org.eclipse.emf.common.notify.NotificationChain; import org.eclipse.emf.common.util.EList; import org.eclipse.emf.ecore.EClass; import org.eclipse.emf.ecore.InternalEObject; import org.eclipse.emf.ecore.impl.MinimalEObjectImpl; import org.eclipse.emf.ecore.util.EObjectContainmentEList; import org.eclipse.emf.ecore.util.InternalEList; /** * * An implementation of the model object 'Root'. * *

* The following features are implemented: *

* * * @generated */ public class RootImpl extends MinimalEObjectImpl.Container implements Root { /** * The cached value of the '{@link #getIncludes() Includes}' containment reference list. * * * @see #getIncludes() * @generated * @ordered */ protected EList includes; /** * The cached value of the '{@link #getComponentDefinitions() Component Definitions}' containment reference list. * * * @see #getComponentDefinitions() * @generated * @ordered */ protected EList componentDefinitions; /** * The cached value of the '{@link #getEnumDefinitions() Enum Definitions}' containment reference list. * * * @see #getEnumDefinitions() * @generated * @ordered */ protected EList enumDefinitions; /** * The cached value of the '{@link #getInstantiations() Instantiations}' containment reference list. * * * @see #getInstantiations() * @generated * @ordered */ protected EList instantiations; /** * The cached value of the '{@link #getPropertyAssignments() Property Assignments}' containment reference list. * * * @see #getPropertyAssignments() * @generated * @ordered */ protected EList propertyAssignments; /** * The cached value of the '{@link #getPropertyDefinitions() Property Definitions}' containment reference list. * * * @see #getPropertyDefinitions() * @generated * @ordered */ protected EList propertyDefinitions; /** * * * @generated */ protected RootImpl() { super(); } /** * * * @generated */ @Override protected EClass eStaticClass() { return RdlPackage.Literals.ROOT; } /** * * * @generated */ public EList getIncludes() { if (includes == null) { includes = new EObjectContainmentEList(Include.class, this, RdlPackage.ROOT__INCLUDES); } return includes; } /** * * * @generated */ public EList getComponentDefinitions() { if (componentDefinitions == null) { componentDefinitions = new EObjectContainmentEList(ComponentDefinition.class, this, RdlPackage.ROOT__COMPONENT_DEFINITIONS); } return componentDefinitions; } /** * * * @generated */ public EList getEnumDefinitions() { if (enumDefinitions == null) { enumDefinitions = new EObjectContainmentEList(EnumDefinition.class, this, RdlPackage.ROOT__ENUM_DEFINITIONS); } return enumDefinitions; } /** * * * @generated */ public EList getInstantiations() { if (instantiations == null) { instantiations = new EObjectContainmentEList(Instantiation.class, this, RdlPackage.ROOT__INSTANTIATIONS); } return instantiations; } /** * * * @generated */ public EList getPropertyAssignments() { if (propertyAssignments == null) { propertyAssignments = new EObjectContainmentEList(PropertyAssignment.class, this, RdlPackage.ROOT__PROPERTY_ASSIGNMENTS); } return propertyAssignments; } /** * * * @generated */ public EList getPropertyDefinitions() { if (propertyDefinitions == null) { propertyDefinitions = new EObjectContainmentEList(PropertyDefinition.class, this, RdlPackage.ROOT__PROPERTY_DEFINITIONS); } return propertyDefinitions; } /** * * * @generated */ @Override public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) { switch (featureID) { case RdlPackage.ROOT__INCLUDES: return ((InternalEList)getIncludes()).basicRemove(otherEnd, msgs); case RdlPackage.ROOT__COMPONENT_DEFINITIONS: return ((InternalEList)getComponentDefinitions()).basicRemove(otherEnd, msgs); case RdlPackage.ROOT__ENUM_DEFINITIONS: return ((InternalEList)getEnumDefinitions()).basicRemove(otherEnd, msgs); case RdlPackage.ROOT__INSTANTIATIONS: return ((InternalEList)getInstantiations()).basicRemove(otherEnd, msgs); case RdlPackage.ROOT__PROPERTY_ASSIGNMENTS: return ((InternalEList)getPropertyAssignments()).basicRemove(otherEnd, msgs); case RdlPackage.ROOT__PROPERTY_DEFINITIONS: return ((InternalEList)getPropertyDefinitions()).basicRemove(otherEnd, msgs); } return super.eInverseRemove(otherEnd, featureID, msgs); } /** * * * @generated */ @Override public Object eGet(int featureID, boolean resolve, boolean coreType) { switch (featureID) { case RdlPackage.ROOT__INCLUDES: return getIncludes(); case RdlPackage.ROOT__COMPONENT_DEFINITIONS: return getComponentDefinitions(); case RdlPackage.ROOT__ENUM_DEFINITIONS: return getEnumDefinitions(); case RdlPackage.ROOT__INSTANTIATIONS: return getInstantiations(); case RdlPackage.ROOT__PROPERTY_ASSIGNMENTS: return getPropertyAssignments(); case RdlPackage.ROOT__PROPERTY_DEFINITIONS: return getPropertyDefinitions(); } return super.eGet(featureID, resolve, coreType); } /** * * * @generated */ @SuppressWarnings("unchecked") @Override public void eSet(int featureID, Object newValue) { switch (featureID) { case RdlPackage.ROOT__INCLUDES: getIncludes().clear(); getIncludes().addAll((Collection)newValue); return; case RdlPackage.ROOT__COMPONENT_DEFINITIONS: getComponentDefinitions().clear(); getComponentDefinitions().addAll((Collection)newValue); return; case RdlPackage.ROOT__ENUM_DEFINITIONS: getEnumDefinitions().clear(); getEnumDefinitions().addAll((Collection)newValue); return; case RdlPackage.ROOT__INSTANTIATIONS: getInstantiations().clear(); getInstantiations().addAll((Collection)newValue); return; case RdlPackage.ROOT__PROPERTY_ASSIGNMENTS: getPropertyAssignments().clear(); getPropertyAssignments().addAll((Collection)newValue); return; case RdlPackage.ROOT__PROPERTY_DEFINITIONS: getPropertyDefinitions().clear(); getPropertyDefinitions().addAll((Collection)newValue); return; } super.eSet(featureID, newValue); } /** * * * @generated */ @Override public void eUnset(int featureID) { switch (featureID) { case RdlPackage.ROOT__INCLUDES: getIncludes().clear(); return; case RdlPackage.ROOT__COMPONENT_DEFINITIONS: getComponentDefinitions().clear(); return; case RdlPackage.ROOT__ENUM_DEFINITIONS: getEnumDefinitions().clear(); return; case RdlPackage.ROOT__INSTANTIATIONS: getInstantiations().clear(); return; case RdlPackage.ROOT__PROPERTY_ASSIGNMENTS: getPropertyAssignments().clear(); return; case RdlPackage.ROOT__PROPERTY_DEFINITIONS: getPropertyDefinitions().clear(); return; } super.eUnset(featureID); } /** * * * @generated */ @Override public boolean eIsSet(int featureID) { switch (featureID) { case RdlPackage.ROOT__INCLUDES: return includes != null && !includes.isEmpty(); case RdlPackage.ROOT__COMPONENT_DEFINITIONS: return componentDefinitions != null && !componentDefinitions.isEmpty(); case RdlPackage.ROOT__ENUM_DEFINITIONS: return enumDefinitions != null && !enumDefinitions.isEmpty(); case RdlPackage.ROOT__INSTANTIATIONS: return instantiations != null && !instantiations.isEmpty(); case RdlPackage.ROOT__PROPERTY_ASSIGNMENTS: return propertyAssignments != null && !propertyAssignments.isEmpty(); case RdlPackage.ROOT__PROPERTY_DEFINITIONS: return propertyDefinitions != null && !propertyDefinitions.isEmpty(); } return super.eIsSet(featureID); } } //RootImpl