1 /*******************************************************************************
2 * Copyright (c) 2011, 2014 Obeo.
3 * All rights reserved. This program and the accompanying materials
4 * are made available under the terms of the Eclipse Public License v1.0
5 * which accompanies this distribution, and is available at
6 * http://www.eclipse.org/legal/epl-v10.html
9 * Obeo - initial API and implementation
10 *******************************************************************************/
11 package org
.eclipse
.emf
.compare
.uml2
.profile
.test
.uml2comparetestprofile
.impl
;
13 import org
.eclipse
.emf
.common
.notify
.Notification
;
14 import org
.eclipse
.emf
.compare
.uml2
.profile
.test
.uml2comparetestprofile
.ACliche3
;
15 import org
.eclipse
.emf
.compare
.uml2
.profile
.test
.uml2comparetestprofile
.UML2CompareTestProfilePackage
;
16 import org
.eclipse
.emf
.ecore
.EClass
;
17 import org
.eclipse
.emf
.ecore
.InternalEObject
;
18 import org
.eclipse
.emf
.ecore
.impl
.ENotificationImpl
;
19 import org
.eclipse
.emf
.ecore
.impl
.EObjectImpl
;
22 * <!-- begin-user-doc --> An implementation of the model object '<em><b>ACliche3</b></em>'. <!-- end-user-doc
25 * The following features are implemented:
28 * {@link org.eclipse.emf.compare.uml2.profile.test.uml2comparetestprofile.impl.ACliche3Impl#getBase_Class
29 * <em>Base Class</em>}</li>
35 public class ACliche3Impl
extends EObjectImpl
implements ACliche3
{
37 * The cached value of the '{@link #getBase_Class() <em>Base Class</em>}' reference. <!-- begin-user-doc
38 * --> <!-- end-user-doc -->
40 * @see #getBase_Class()
44 protected org
.eclipse
.uml2
.uml
.Class base_Class
;
47 * <!-- begin-user-doc --> <!-- end-user-doc -->
51 protected ACliche3Impl() {
56 * <!-- begin-user-doc --> <!-- end-user-doc -->
61 protected EClass
eStaticClass() {
62 return UML2CompareTestProfilePackage
.Literals
.ACLICHE3
;
66 * <!-- begin-user-doc --> <!-- end-user-doc -->
70 public org
.eclipse
.uml2
.uml
.Class
getBase_Class() {
71 if (base_Class
!= null && base_Class
.eIsProxy()) {
72 InternalEObject oldBase_Class
= (InternalEObject
)base_Class
;
73 base_Class
= (org
.eclipse
.uml2
.uml
.Class
)eResolveProxy(oldBase_Class
);
74 if (base_Class
!= oldBase_Class
) {
75 if (eNotificationRequired()) {
76 eNotify(new ENotificationImpl(this, Notification
.RESOLVE
,
77 UML2CompareTestProfilePackage
.ACLICHE3__BASE_CLASS
, oldBase_Class
, base_Class
));
85 * <!-- begin-user-doc --> <!-- end-user-doc -->
89 public org
.eclipse
.uml2
.uml
.Class
basicGetBase_Class() {
94 * <!-- begin-user-doc --> <!-- end-user-doc -->
98 public void setBase_Class(org
.eclipse
.uml2
.uml
.Class newBase_Class
) {
99 org
.eclipse
.uml2
.uml
.Class oldBase_Class
= base_Class
;
100 base_Class
= newBase_Class
;
101 if (eNotificationRequired()) {
102 eNotify(new ENotificationImpl(this, Notification
.SET
,
103 UML2CompareTestProfilePackage
.ACLICHE3__BASE_CLASS
, oldBase_Class
, base_Class
));
108 * <!-- begin-user-doc --> <!-- end-user-doc -->
113 public Object
eGet(int featureID
, boolean resolve
, boolean coreType
) {
115 case UML2CompareTestProfilePackage
.ACLICHE3__BASE_CLASS
:
117 return getBase_Class();
119 return basicGetBase_Class();
121 return super.eGet(featureID
, resolve
, coreType
);
125 * <!-- begin-user-doc --> <!-- end-user-doc -->
130 public void eSet(int featureID
, Object newValue
) {
132 case UML2CompareTestProfilePackage
.ACLICHE3__BASE_CLASS
:
133 setBase_Class((org
.eclipse
.uml2
.uml
.Class
)newValue
);
136 super.eSet(featureID
, newValue
);
140 * <!-- begin-user-doc --> <!-- end-user-doc -->
145 public void eUnset(int featureID
) {
147 case UML2CompareTestProfilePackage
.ACLICHE3__BASE_CLASS
:
148 setBase_Class((org
.eclipse
.uml2
.uml
.Class
)null);
151 super.eUnset(featureID
);
155 * <!-- begin-user-doc --> <!-- end-user-doc -->
160 public boolean eIsSet(int featureID
) {
162 case UML2CompareTestProfilePackage
.ACLICHE3__BASE_CLASS
:
163 return base_Class
!= null;
165 return super.eIsSet(featureID
);