From be4f78978faba3d3ceb88df02a7f93a2e09ff1e0 Mon Sep 17 00:00:00 2001 From: Kenji Hosokawa Date: Tue, 3 Aug 2021 18:42:39 +0900 Subject: Initial commit Bug-AGL: SPEC-4033 Signed-off-by: Kenji Hosokawa --- .../src/rba/core/impl/ConstraintImpl.java | 186 +++++++++++++++++++++ 1 file changed, 186 insertions(+) create mode 100644 rba.model.core/src/rba/core/impl/ConstraintImpl.java (limited to 'rba.model.core/src/rba/core/impl/ConstraintImpl.java') diff --git a/rba.model.core/src/rba/core/impl/ConstraintImpl.java b/rba.model.core/src/rba/core/impl/ConstraintImpl.java new file mode 100644 index 0000000..180c124 --- /dev/null +++ b/rba.model.core/src/rba/core/impl/ConstraintImpl.java @@ -0,0 +1,186 @@ +/** + */ +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 -- cgit 1.2.3-korg