1 | /** |
2 | * Copyright 2005-2009 by SDQ, IPD, University of Karlsruhe, Germany |
3 | * |
4 | * $Id$ |
5 | */ |
6 | package de.uka.ipd.sdq.pcm.repository.impl; |
7 | |
8 | import org.eclipse.emf.common.notify.Notification; |
9 | import org.eclipse.emf.ecore.EClass; |
10 | import org.eclipse.emf.ecore.InternalEObject; |
11 | import org.eclipse.emf.ecore.impl.ENotificationImpl; |
12 | |
13 | import de.uka.ipd.sdq.pcm.repository.InfrastructureInterface; |
14 | import de.uka.ipd.sdq.pcm.repository.InfrastructureProvidedRole; |
15 | import de.uka.ipd.sdq.pcm.repository.RepositoryPackage; |
16 | |
17 | /** |
18 | * <!-- begin-user-doc --> |
19 | * An implementation of the model object '<em><b>Infrastructure Provided Role</b></em>'. |
20 | * <!-- end-user-doc --> |
21 | * <p> |
22 | * The following features are implemented: |
23 | * <ul> |
24 | * <li>{@link de.uka.ipd.sdq.pcm.repository.impl.InfrastructureProvidedRoleImpl#getProvidedInterface__InfrastructureProvidedRole <em>Provided Interface Infrastructure Provided Role</em>}</li> |
25 | * </ul> |
26 | * </p> |
27 | * |
28 | * @generated |
29 | */ |
30 | public class InfrastructureProvidedRoleImpl extends ProvidedRoleImpl implements InfrastructureProvidedRole { |
31 | /** |
32 | * <!-- begin-user-doc --> |
33 | * <!-- end-user-doc --> |
34 | * @generated |
35 | */ |
36 | public static final String copyright = "Copyright 2005-2009 by SDQ, IPD, University of Karlsruhe, Germany"; |
37 | |
38 | /** |
39 | * The cached value of the '{@link #getProvidedInterface__InfrastructureProvidedRole() <em>Provided Interface Infrastructure Provided Role</em>}' reference. |
40 | * <!-- begin-user-doc --> |
41 | * <!-- end-user-doc --> |
42 | * @see #getProvidedInterface__InfrastructureProvidedRole() |
43 | * @generated |
44 | * @ordered |
45 | */ |
46 | protected InfrastructureInterface providedInterface__InfrastructureProvidedRole; |
47 | |
48 | /** |
49 | * <!-- begin-user-doc --> |
50 | * <!-- end-user-doc --> |
51 | * @generated |
52 | */ |
53 | protected InfrastructureProvidedRoleImpl() { |
54 | super(); |
55 | } |
56 | |
57 | /** |
58 | * <!-- begin-user-doc --> |
59 | * <!-- end-user-doc --> |
60 | * @generated |
61 | */ |
62 | @Override |
63 | protected EClass eStaticClass() { |
64 | return RepositoryPackage.Literals.INFRASTRUCTURE_PROVIDED_ROLE; |
65 | } |
66 | |
67 | /** |
68 | * <!-- begin-user-doc --> |
69 | * <!-- end-user-doc --> |
70 | * @generated |
71 | */ |
72 | public InfrastructureInterface getProvidedInterface__InfrastructureProvidedRole() { |
73 | if (providedInterface__InfrastructureProvidedRole != null && providedInterface__InfrastructureProvidedRole.eIsProxy()) { |
74 | InternalEObject oldProvidedInterface__InfrastructureProvidedRole = (InternalEObject)providedInterface__InfrastructureProvidedRole; |
75 | providedInterface__InfrastructureProvidedRole = (InfrastructureInterface)eResolveProxy(oldProvidedInterface__InfrastructureProvidedRole); |
76 | if (providedInterface__InfrastructureProvidedRole != oldProvidedInterface__InfrastructureProvidedRole) { |
77 | if (eNotificationRequired()) |
78 | eNotify(new ENotificationImpl(this, Notification.RESOLVE, RepositoryPackage.INFRASTRUCTURE_PROVIDED_ROLE__PROVIDED_INTERFACE_INFRASTRUCTURE_PROVIDED_ROLE, oldProvidedInterface__InfrastructureProvidedRole, providedInterface__InfrastructureProvidedRole)); |
79 | } |
80 | } |
81 | return providedInterface__InfrastructureProvidedRole; |
82 | } |
83 | |
84 | /** |
85 | * <!-- begin-user-doc --> |
86 | * <!-- end-user-doc --> |
87 | * @generated |
88 | */ |
89 | public InfrastructureInterface basicGetProvidedInterface__InfrastructureProvidedRole() { |
90 | return providedInterface__InfrastructureProvidedRole; |
91 | } |
92 | |
93 | /** |
94 | * <!-- begin-user-doc --> |
95 | * <!-- end-user-doc --> |
96 | * @generated |
97 | */ |
98 | public void setProvidedInterface__InfrastructureProvidedRole(InfrastructureInterface newProvidedInterface__InfrastructureProvidedRole) { |
99 | InfrastructureInterface oldProvidedInterface__InfrastructureProvidedRole = providedInterface__InfrastructureProvidedRole; |
100 | providedInterface__InfrastructureProvidedRole = newProvidedInterface__InfrastructureProvidedRole; |
101 | if (eNotificationRequired()) |
102 | eNotify(new ENotificationImpl(this, Notification.SET, RepositoryPackage.INFRASTRUCTURE_PROVIDED_ROLE__PROVIDED_INTERFACE_INFRASTRUCTURE_PROVIDED_ROLE, oldProvidedInterface__InfrastructureProvidedRole, providedInterface__InfrastructureProvidedRole)); |
103 | } |
104 | |
105 | /** |
106 | * <!-- begin-user-doc --> |
107 | * <!-- end-user-doc --> |
108 | * @generated |
109 | */ |
110 | @Override |
111 | public Object eGet(int featureID, boolean resolve, boolean coreType) { |
112 | switch (featureID) { |
113 | case RepositoryPackage.INFRASTRUCTURE_PROVIDED_ROLE__PROVIDED_INTERFACE_INFRASTRUCTURE_PROVIDED_ROLE: |
114 | if (resolve) return getProvidedInterface__InfrastructureProvidedRole(); |
115 | return basicGetProvidedInterface__InfrastructureProvidedRole(); |
116 | } |
117 | return super.eGet(featureID, resolve, coreType); |
118 | } |
119 | |
120 | /** |
121 | * <!-- begin-user-doc --> |
122 | * <!-- end-user-doc --> |
123 | * @generated |
124 | */ |
125 | @Override |
126 | public void eSet(int featureID, Object newValue) { |
127 | switch (featureID) { |
128 | case RepositoryPackage.INFRASTRUCTURE_PROVIDED_ROLE__PROVIDED_INTERFACE_INFRASTRUCTURE_PROVIDED_ROLE: |
129 | setProvidedInterface__InfrastructureProvidedRole((InfrastructureInterface)newValue); |
130 | return; |
131 | } |
132 | super.eSet(featureID, newValue); |
133 | } |
134 | |
135 | /** |
136 | * <!-- begin-user-doc --> |
137 | * <!-- end-user-doc --> |
138 | * @generated |
139 | */ |
140 | @Override |
141 | public void eUnset(int featureID) { |
142 | switch (featureID) { |
143 | case RepositoryPackage.INFRASTRUCTURE_PROVIDED_ROLE__PROVIDED_INTERFACE_INFRASTRUCTURE_PROVIDED_ROLE: |
144 | setProvidedInterface__InfrastructureProvidedRole((InfrastructureInterface)null); |
145 | return; |
146 | } |
147 | super.eUnset(featureID); |
148 | } |
149 | |
150 | /** |
151 | * <!-- begin-user-doc --> |
152 | * <!-- end-user-doc --> |
153 | * @generated |
154 | */ |
155 | @Override |
156 | public boolean eIsSet(int featureID) { |
157 | switch (featureID) { |
158 | case RepositoryPackage.INFRASTRUCTURE_PROVIDED_ROLE__PROVIDED_INTERFACE_INFRASTRUCTURE_PROVIDED_ROLE: |
159 | return providedInterface__InfrastructureProvidedRole != null; |
160 | } |
161 | return super.eIsSet(featureID); |
162 | } |
163 | |
164 | } //InfrastructureProvidedRoleImpl |