/** * Copyright (c) 2007, 2013 Borland Software Corporation * * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v2.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v20.html * * Contributors: * Borland Software Corporation - initial API and implementation * * */ package org.eclipse.m2m.internal.qvt.oml.cst.impl; 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; import org.eclipse.m2m.internal.qvt.oml.cst.CSTPackage; import org.eclipse.m2m.internal.qvt.oml.cst.RaiseExpCS; import org.eclipse.ocl.cst.OCLExpressionCS; import org.eclipse.ocl.cst.TypeCS; /** * * An implementation of the model object 'Raise Exp CS'. * *

* The following features are implemented: *

*

* * @generated */ public class RaiseExpCSImpl extends StatementCSImpl implements RaiseExpCS { /** * * * @generated */ public static final String copyright = "Copyright (c) 2007 Borland Software Corporation\r\n\r\nAll rights reserved. This program and the accompanying materials\r\nare made available under the terms of the Eclipse Public License v2.0\r\nwhich accompanies this distribution, and is available at\r\nhttp://www.eclipse.org/legal/epl-v20.html\r\n \r\nContributors:\r\n Borland Software Corporation - initial API and implementation\r\n\r\n"; //$NON-NLS-1$ /** * The cached value of the '{@link #getException() Exception}' reference. * * * @see #getException() * @generated * @ordered */ protected TypeCS exception; /** * The cached value of the '{@link #getArgument() Argument}' reference. * * * @see #getArgument() * @generated * @ordered */ protected OCLExpressionCS argument; /** * * * @generated */ protected RaiseExpCSImpl() { super(); } /** * * * @generated */ @Override protected EClass eStaticClass() { return CSTPackage.Literals.RAISE_EXP_CS; } /** * * * @generated */ public TypeCS getException() { if (exception != null && exception.eIsProxy()) { InternalEObject oldException = (InternalEObject)exception; exception = (TypeCS)eResolveProxy(oldException); if (exception != oldException) { if (eNotificationRequired()) eNotify(new ENotificationImpl(this, Notification.RESOLVE, CSTPackage.RAISE_EXP_CS__EXCEPTION, oldException, exception)); } } return exception; } /** * * * @generated */ public TypeCS basicGetException() { return exception; } /** * * * @generated */ public void setException(TypeCS newException) { TypeCS oldException = exception; exception = newException; if (eNotificationRequired()) eNotify(new ENotificationImpl(this, Notification.SET, CSTPackage.RAISE_EXP_CS__EXCEPTION, oldException, exception)); } /** * * * @generated */ public OCLExpressionCS getArgument() { if (argument != null && argument.eIsProxy()) { InternalEObject oldArgument = (InternalEObject)argument; argument = (OCLExpressionCS)eResolveProxy(oldArgument); if (argument != oldArgument) { if (eNotificationRequired()) eNotify(new ENotificationImpl(this, Notification.RESOLVE, CSTPackage.RAISE_EXP_CS__ARGUMENT, oldArgument, argument)); } } return argument; } /** * * * @generated */ public OCLExpressionCS basicGetArgument() { return argument; } /** * * * @generated */ public void setArgument(OCLExpressionCS newArgument) { OCLExpressionCS oldArgument = argument; argument = newArgument; if (eNotificationRequired()) eNotify(new ENotificationImpl(this, Notification.SET, CSTPackage.RAISE_EXP_CS__ARGUMENT, oldArgument, argument)); } /** * * * @generated */ @Override public Object eGet(int featureID, boolean resolve, boolean coreType) { switch (featureID) { case CSTPackage.RAISE_EXP_CS__EXCEPTION: if (resolve) return getException(); return basicGetException(); case CSTPackage.RAISE_EXP_CS__ARGUMENT: if (resolve) return getArgument(); return basicGetArgument(); } return super.eGet(featureID, resolve, coreType); } /** * * * @generated */ @Override public void eSet(int featureID, Object newValue) { switch (featureID) { case CSTPackage.RAISE_EXP_CS__EXCEPTION: setException((TypeCS)newValue); return; case CSTPackage.RAISE_EXP_CS__ARGUMENT: setArgument((OCLExpressionCS)newValue); return; } super.eSet(featureID, newValue); } /** * * * @generated */ @Override public void eUnset(int featureID) { switch (featureID) { case CSTPackage.RAISE_EXP_CS__EXCEPTION: setException((TypeCS)null); return; case CSTPackage.RAISE_EXP_CS__ARGUMENT: setArgument((OCLExpressionCS)null); return; } super.eUnset(featureID); } /** * * * @generated */ @Override public boolean eIsSet(int featureID) { switch (featureID) { case CSTPackage.RAISE_EXP_CS__EXCEPTION: return exception != null; case CSTPackage.RAISE_EXP_CS__ARGUMENT: return argument != null; } return super.eIsSet(featureID); } } //RaiseExpCSImpl