/******************************************************************************* * Copyright (c) 2013-2016 Jean-Marie Gauthier, University of Franche-Comte, and Samares-Engineering * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: * Jean-Marie Gauthier, University of Franche-Comte - initial API and implementation * Jean-Marie Gauthier, Samares-Engineering - Neon implementation *******************************************************************************/ /** */ package edu.ufc.femtost.disc.sysml4modelica.profile.other.impl; import edu.ufc.femtost.disc.sysml4modelica.profile.other.ModelicaAnnotation; import edu.ufc.femtost.disc.sysml4modelica.profile.other.otherPackage; 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.emf.ecore.impl.MinimalEObjectImpl; import org.eclipse.uml2.uml.Comment; /** * <!-- begin-user-doc --> * An implementation of the model object '<em><b>Modelica Annotation</b></em>'. * <!-- end-user-doc --> * <p> * The following features are implemented: * </p> * <ul> * <li>{@link edu.ufc.femtost.disc.sysml4modelica.profile.other.impl.ModelicaAnnotationImpl#getBase_Comment <em>Base Comment</em>}</li> * </ul> * * @generated */ public class ModelicaAnnotationImpl extends MinimalEObjectImpl.Container implements ModelicaAnnotation { /** * The cached value of the '{@link #getBase_Comment() <em>Base Comment</em>}' reference. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @see #getBase_Comment() * @generated * @ordered */ protected Comment base_Comment; /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ protected ModelicaAnnotationImpl() { super(); } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ @Override protected EClass eStaticClass() { return otherPackage.Literals.MODELICA_ANNOTATION; } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public Comment getBase_Comment() { if (base_Comment != null && base_Comment.eIsProxy()) { InternalEObject oldBase_Comment = (InternalEObject)base_Comment; base_Comment = (Comment)eResolveProxy(oldBase_Comment); if (base_Comment != oldBase_Comment) { if (eNotificationRequired()) eNotify(new ENotificationImpl(this, Notification.RESOLVE, otherPackage.MODELICA_ANNOTATION__BASE_COMMENT, oldBase_Comment, base_Comment)); } } return base_Comment; } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public Comment basicGetBase_Comment() { return base_Comment; } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public void setBase_Comment(Comment newBase_Comment) { Comment oldBase_Comment = base_Comment; base_Comment = newBase_Comment; if (eNotificationRequired()) eNotify(new ENotificationImpl(this, Notification.SET, otherPackage.MODELICA_ANNOTATION__BASE_COMMENT, oldBase_Comment, base_Comment)); } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ @Override public Object eGet(int featureID, boolean resolve, boolean coreType) { switch (featureID) { case otherPackage.MODELICA_ANNOTATION__BASE_COMMENT: if (resolve) return getBase_Comment(); return basicGetBase_Comment(); } return super.eGet(featureID, resolve, coreType); } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ @Override public void eSet(int featureID, Object newValue) { switch (featureID) { case otherPackage.MODELICA_ANNOTATION__BASE_COMMENT: setBase_Comment((Comment)newValue); return; } super.eSet(featureID, newValue); } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ @Override public void eUnset(int featureID) { switch (featureID) { case otherPackage.MODELICA_ANNOTATION__BASE_COMMENT: setBase_Comment((Comment)null); return; } super.eUnset(featureID); } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ @Override public boolean eIsSet(int featureID) { switch (featureID) { case otherPackage.MODELICA_ANNOTATION__BASE_COMMENT: return base_Comment != null; } return super.eIsSet(featureID); } } //ModelicaAnnotationImpl