/** */ package rba.core.impl; import org.eclipse.emf.common.notify.Notification; import org.eclipse.emf.ecore.EClass; import org.eclipse.emf.ecore.impl.ENotificationImpl; import rba.core.Constraint; import rba.core.RBACorePackage; /** * An implementation of the model object 'Constraint'. *

* The following features are implemented: *

* * * @generated */ public class ConstraintImpl extends AbstractConstraintImpl implements Constraint { /** * The default value of the '{@link #isRuntime() Runtime}' attribute. * * @see #isRuntime() * @generated * @ordered */ protected static final boolean RUNTIME_EDEFAULT = true; /** * The cached value of the '{@link #isRuntime() Runtime}' attribute. * * @see #isRuntime() * @generated * @ordered */ protected boolean runtime = RUNTIME_EDEFAULT; /** * This is true if the Runtime attribute has been set. * * @generated * @ordered */ protected boolean runtimeESet; /** * * @generated */ protected ConstraintImpl() { super(); } /** * * @generated */ @Override protected EClass eStaticClass() { return RBACorePackage.Literals.CONSTRAINT; } /** * * @generated */ public boolean isRuntime() { return runtime; } /** * * @generated */ public void setRuntime(boolean newRuntime) { boolean oldRuntime = runtime; runtime = newRuntime; boolean oldRuntimeESet = runtimeESet; runtimeESet = true; if (eNotificationRequired()) eNotify(new ENotificationImpl(this, Notification.SET, RBACorePackage.CONSTRAINT__RUNTIME, oldRuntime, runtime, !oldRuntimeESet)); } /** * * @generated */ public void unsetRuntime() { boolean oldRuntime = runtime; boolean oldRuntimeESet = runtimeESet; runtime = RUNTIME_EDEFAULT; runtimeESet = false; if (eNotificationRequired()) eNotify(new ENotificationImpl(this, Notification.UNSET, RBACorePackage.CONSTRAINT__RUNTIME, oldRuntime, RUNTIME_EDEFAULT, oldRuntimeESet)); } /** * * @generated */ public boolean isSetRuntime() { return runtimeESet; } /** * * @generated */ @Override public Object eGet(int featureID, boolean resolve, boolean coreType) { switch (featureID) { case RBACorePackage.CONSTRAINT__RUNTIME: return isRuntime(); } return super.eGet(featureID, resolve, coreType); } /** * * @generated */ @Override public void eSet(int featureID, Object newValue) { switch (featureID) { case RBACorePackage.CONSTRAINT__RUNTIME: setRuntime((Boolean) newValue); return; } super.eSet(featureID, newValue); } /** * * @generated */ @Override public void eUnset(int featureID) { switch (featureID) { case RBACorePackage.CONSTRAINT__RUNTIME: unsetRuntime(); return; } super.eUnset(featureID); } /** * * @generated */ @Override public boolean eIsSet(int featureID) { switch (featureID) { case RBACorePackage.CONSTRAINT__RUNTIME: return isSetRuntime(); } return super.eIsSet(featureID); } /** * * @generated */ @Override public String toString() { if (eIsProxy()) return super.toString(); StringBuffer result = new StringBuffer(super.toString()); result.append(" (runtime: "); if (runtimeESet) result.append(runtime); else result.append(""); result.append(')'); return result.toString(); } } // ConstraintImpl