diff options
author | 2021-08-03 18:42:39 +0900 | |
---|---|---|
committer | 2021-08-06 19:32:38 +0900 | |
commit | be4f78978faba3d3ceb88df02a7f93a2e09ff1e0 (patch) | |
tree | 1f3f1a96251ac4f655c8a96fc33d5d4ee779cd06 /rba.model.core/src/rba/core/impl/ExpressionImpl.java | |
parent | 71ca7c6cab863767ef30c8bd05b2bbfda8731cb5 (diff) |
Initial commit
Bug-AGL: SPEC-4033
Signed-off-by: Kenji Hosokawa <khosokawa@jp.adit-jv.com>
Diffstat (limited to 'rba.model.core/src/rba/core/impl/ExpressionImpl.java')
-rw-r--r-- | rba.model.core/src/rba/core/impl/ExpressionImpl.java | 264 |
1 files changed, 264 insertions, 0 deletions
diff --git a/rba.model.core/src/rba/core/impl/ExpressionImpl.java b/rba.model.core/src/rba/core/impl/ExpressionImpl.java new file mode 100644 index 0000000..207158b --- /dev/null +++ b/rba.model.core/src/rba/core/impl/ExpressionImpl.java @@ -0,0 +1,264 @@ +/** + */ +package rba.core.impl; + +import java.lang.reflect.InvocationTargetException; + +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; +import rba.core.Expression; +import rba.core.ExpressionType; +import rba.core.LetStatement; +import rba.core.RBACorePackage; + +/** + * <!-- begin-user-doc --> An implementation of the model object '<em><b>Expression</b></em>'. <!-- end-user-doc --> + * <p> + * The following features are implemented: + * </p> + * <ul> + * <li>{@link rba.core.impl.ExpressionImpl#getType <em>Type</em>}</li> + * <li>{@link rba.core.impl.ExpressionImpl#getExpression <em>Expression</em>}</li> + * <li>{@link rba.core.impl.ExpressionImpl#getLetStatements <em>Let Statements</em>}</li> + * </ul> + * + * @generated + */ +public abstract class ExpressionImpl extends MinimalEObjectImpl.Container implements Expression { + /** + * The default value of the '{@link #getType() <em>Type</em>}' attribute. + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @see #getType() + * @generated + * @ordered + */ + protected static final ExpressionType TYPE_EDEFAULT = ExpressionType.VALUE; + + /** + * The default value of the '{@link #getExpression() <em>Expression</em>}' attribute. + * <!-- begin-user-doc --> <!-- + * end-user-doc --> + * @see #getExpression() + * @generated + * @ordered + */ + protected static final String EXPRESSION_EDEFAULT = null; + + /** + * The cached value of the '{@link #getLetStatements() <em>Let Statements</em>}' containment reference list. <!-- + * begin-user-doc --> <!-- end-user-doc --> + * @see #getLetStatements() + * @generated + * @ordered + */ + protected EList<LetStatement> letStatements; + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + protected ExpressionImpl() { + super(); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + @Override + protected EClass eStaticClass() { + return RBACorePackage.Literals.EXPRESSION; + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated NOT + */ + public ExpressionType getType() { + return getUnderlyingType(); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated NOT + */ + public boolean isSetType() { + return true; + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated NOT + */ + public String getExpression() { + return getExpressionText(); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + public void setExpression(String newExpression) { + // TODO: implement this method to set the 'Expression' attribute + // Ensure that you remove @generated or mark it @generated NOT + throw new UnsupportedOperationException(); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + public void unsetExpression() { + // TODO: implement this method to unset the 'Expression' attribute + // Ensure that you remove @generated or mark it @generated NOT + throw new UnsupportedOperationException(); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated NOT + */ + public boolean isSetExpression() { + return true; + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + public EList<LetStatement> getLetStatements() { + if (letStatements == null) { + letStatements = new EObjectContainmentEList<LetStatement>(LetStatement.class, this, + RBACorePackage.EXPRESSION__LET_STATEMENTS); + } + return letStatements; + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + public ExpressionType getUnderlyingType() { + // TODO: implement this method + // Ensure that you remove @generated or mark it @generated NOT + throw new UnsupportedOperationException(); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + public String getExpressionText() { + // TODO: implement this method + // Ensure that you remove @generated or mark it @generated NOT + throw new UnsupportedOperationException(); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + @Override + public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) { + switch (featureID) { + case RBACorePackage.EXPRESSION__LET_STATEMENTS: + return ((InternalEList<?>) getLetStatements()).basicRemove(otherEnd, msgs); + } + return super.eInverseRemove(otherEnd, featureID, msgs); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) { + switch (featureID) { + case RBACorePackage.EXPRESSION__TYPE: + return getType(); + case RBACorePackage.EXPRESSION__EXPRESSION: + return getExpression(); + case RBACorePackage.EXPRESSION__LET_STATEMENTS: + return getLetStatements(); + } + return super.eGet(featureID, resolve, coreType); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + @SuppressWarnings("unchecked") + @Override + public void eSet(int featureID, Object newValue) { + switch (featureID) { + case RBACorePackage.EXPRESSION__EXPRESSION: + setExpression((String) newValue); + return; + case RBACorePackage.EXPRESSION__LET_STATEMENTS: + getLetStatements().clear(); + getLetStatements().addAll((Collection<? extends LetStatement>) newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + @Override + public void eUnset(int featureID) { + switch (featureID) { + case RBACorePackage.EXPRESSION__EXPRESSION: + unsetExpression(); + return; + case RBACorePackage.EXPRESSION__LET_STATEMENTS: + getLetStatements().clear(); + return; + } + super.eUnset(featureID); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + @Override + public boolean eIsSet(int featureID) { + switch (featureID) { + case RBACorePackage.EXPRESSION__TYPE: + return isSetType(); + case RBACorePackage.EXPRESSION__EXPRESSION: + return isSetExpression(); + case RBACorePackage.EXPRESSION__LET_STATEMENTS: + return letStatements != null && !letStatements.isEmpty(); + } + return super.eIsSet(featureID); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + @Override + public Object eInvoke(int operationID, EList<?> arguments) throws InvocationTargetException { + switch (operationID) { + case RBACorePackage.EXPRESSION___GET_UNDERLYING_TYPE: + return getUnderlyingType(); + case RBACorePackage.EXPRESSION___GET_EXPRESSION_TEXT: + return getExpressionText(); + } + return super.eInvoke(operationID, arguments); + } + +} // ExpressionImpl |