/** */ 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; /** * An implementation of the model object 'Expression'. *

* The following features are implemented: *

* * * @generated */ public abstract class ExpressionImpl extends MinimalEObjectImpl.Container implements Expression { /** * The default value of the '{@link #getType() Type}' attribute. * * @see #getType() * @generated * @ordered */ protected static final ExpressionType TYPE_EDEFAULT = ExpressionType.VALUE; /** * The default value of the '{@link #getExpression() Expression}' attribute. * * @see #getExpression() * @generated * @ordered */ protected static final String EXPRESSION_EDEFAULT = null; /** * The cached value of the '{@link #getLetStatements() Let Statements}' containment reference list. * @see #getLetStatements() * @generated * @ordered */ protected EList letStatements; /** * * @generated */ protected ExpressionImpl() { super(); } /** * * @generated */ @Override protected EClass eStaticClass() { return RBACorePackage.Literals.EXPRESSION; } /** * * @generated NOT */ public ExpressionType getType() { return getUnderlyingType(); } /** * * @generated NOT */ public boolean isSetType() { return true; } /** * * @generated NOT */ public String getExpression() { return getExpressionText(); } /** * * @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(); } /** * * @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(); } /** * * @generated NOT */ public boolean isSetExpression() { return true; } /** * * @generated */ public EList getLetStatements() { if (letStatements == null) { letStatements = new EObjectContainmentEList(LetStatement.class, this, RBACorePackage.EXPRESSION__LET_STATEMENTS); } return letStatements; } /** * * @generated */ public ExpressionType getUnderlyingType() { // TODO: implement this method // Ensure that you remove @generated or mark it @generated NOT throw new UnsupportedOperationException(); } /** * * @generated */ public String getExpressionText() { // TODO: implement this method // Ensure that you remove @generated or mark it @generated NOT throw new UnsupportedOperationException(); } /** * * @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); } /** * * @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); } /** * * @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) newValue); return; } super.eSet(featureID, newValue); } /** * * @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); } /** * * @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); } /** * * @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