/** * generated by Xtext 2.16.0 */ package hu.bme.mit.inf.dslreasoner.application.applicationConfiguration.impl; import hu.bme.mit.inf.dslreasoner.application.applicationConfiguration.ApplicationConfigurationPackage; import hu.bme.mit.inf.dslreasoner.application.applicationConfiguration.ReliabilityObjectiveFunction; import hu.bme.mit.inf.dslreasoner.faulttree.components.cftLanguage.CftModel; import hu.bme.mit.inf.dslreasoner.faulttree.components.cftLanguage.TransformationDefinition; import org.eclipse.emf.common.notify.Notification; import org.eclipse.emf.ecore.EClass; import org.eclipse.emf.ecore.InternalEObject; import org.eclipse.emf.ecore.impl.ENotificationImpl; /** * * An implementation of the model object 'Reliability Objective Function'. * *

* The following features are implemented: *

* * * @generated */ public class ReliabilityObjectiveFunctionImpl extends ObjectiveFunctionImpl implements ReliabilityObjectiveFunction { /** * The cached value of the '{@link #getPackage() Package}' reference. * * * @see #getPackage() * @generated * @ordered */ protected CftModel package_; /** * The cached value of the '{@link #getTransformation() Transformation}' reference. * * * @see #getTransformation() * @generated * @ordered */ protected TransformationDefinition transformation; /** * * * @generated */ protected ReliabilityObjectiveFunctionImpl() { super(); } /** * * * @generated */ @Override protected EClass eStaticClass() { return ApplicationConfigurationPackage.Literals.RELIABILITY_OBJECTIVE_FUNCTION; } /** * * * @generated */ @Override public CftModel getPackage() { if (package_ != null && package_.eIsProxy()) { InternalEObject oldPackage = (InternalEObject)package_; package_ = (CftModel)eResolveProxy(oldPackage); if (package_ != oldPackage) { if (eNotificationRequired()) eNotify(new ENotificationImpl(this, Notification.RESOLVE, ApplicationConfigurationPackage.RELIABILITY_OBJECTIVE_FUNCTION__PACKAGE, oldPackage, package_)); } } return package_; } /** * * * @generated */ public CftModel basicGetPackage() { return package_; } /** * * * @generated */ @Override public void setPackage(CftModel newPackage) { CftModel oldPackage = package_; package_ = newPackage; if (eNotificationRequired()) eNotify(new ENotificationImpl(this, Notification.SET, ApplicationConfigurationPackage.RELIABILITY_OBJECTIVE_FUNCTION__PACKAGE, oldPackage, package_)); } /** * * * @generated */ @Override public TransformationDefinition getTransformation() { if (transformation != null && transformation.eIsProxy()) { InternalEObject oldTransformation = (InternalEObject)transformation; transformation = (TransformationDefinition)eResolveProxy(oldTransformation); if (transformation != oldTransformation) { if (eNotificationRequired()) eNotify(new ENotificationImpl(this, Notification.RESOLVE, ApplicationConfigurationPackage.RELIABILITY_OBJECTIVE_FUNCTION__TRANSFORMATION, oldTransformation, transformation)); } } return transformation; } /** * * * @generated */ public TransformationDefinition basicGetTransformation() { return transformation; } /** * * * @generated */ @Override public void setTransformation(TransformationDefinition newTransformation) { TransformationDefinition oldTransformation = transformation; transformation = newTransformation; if (eNotificationRequired()) eNotify(new ENotificationImpl(this, Notification.SET, ApplicationConfigurationPackage.RELIABILITY_OBJECTIVE_FUNCTION__TRANSFORMATION, oldTransformation, transformation)); } /** * * * @generated */ @Override public Object eGet(int featureID, boolean resolve, boolean coreType) { switch (featureID) { case ApplicationConfigurationPackage.RELIABILITY_OBJECTIVE_FUNCTION__PACKAGE: if (resolve) return getPackage(); return basicGetPackage(); case ApplicationConfigurationPackage.RELIABILITY_OBJECTIVE_FUNCTION__TRANSFORMATION: if (resolve) return getTransformation(); return basicGetTransformation(); } return super.eGet(featureID, resolve, coreType); } /** * * * @generated */ @Override public void eSet(int featureID, Object newValue) { switch (featureID) { case ApplicationConfigurationPackage.RELIABILITY_OBJECTIVE_FUNCTION__PACKAGE: setPackage((CftModel)newValue); return; case ApplicationConfigurationPackage.RELIABILITY_OBJECTIVE_FUNCTION__TRANSFORMATION: setTransformation((TransformationDefinition)newValue); return; } super.eSet(featureID, newValue); } /** * * * @generated */ @Override public void eUnset(int featureID) { switch (featureID) { case ApplicationConfigurationPackage.RELIABILITY_OBJECTIVE_FUNCTION__PACKAGE: setPackage((CftModel)null); return; case ApplicationConfigurationPackage.RELIABILITY_OBJECTIVE_FUNCTION__TRANSFORMATION: setTransformation((TransformationDefinition)null); return; } super.eUnset(featureID); } /** * * * @generated */ @Override public boolean eIsSet(int featureID) { switch (featureID) { case ApplicationConfigurationPackage.RELIABILITY_OBJECTIVE_FUNCTION__PACKAGE: return package_ != null; case ApplicationConfigurationPackage.RELIABILITY_OBJECTIVE_FUNCTION__TRANSFORMATION: return transformation != null; } return super.eIsSet(featureID); } } //ReliabilityObjectiveFunctionImpl