diff options
author | 2021-06-25 17:12:45 +0200 | |
---|---|---|
committer | 2021-06-25 17:12:45 +0200 | |
commit | baba88758a0ea5f671ab4a2aeacec374bed938c4 (patch) | |
tree | 1be30230a0959ce8d22986d91b1ed2460a328148 /org.eclipse.viatra.solver.language.parent/org.eclipse.viatra.solver.language.model/src/main/emf-gen/org/eclipse/viatra/solver/language/model/problem/impl/ScopeDeclarationImpl.java | |
parent | Initial commit (diff) | |
download | refinery-baba88758a0ea5f671ab4a2aeacec374bed938c4.tar.gz refinery-baba88758a0ea5f671ab4a2aeacec374bed938c4.tar.zst refinery-baba88758a0ea5f671ab4a2aeacec374bed938c4.zip |
Add initial prototype
Diffstat (limited to 'org.eclipse.viatra.solver.language.parent/org.eclipse.viatra.solver.language.model/src/main/emf-gen/org/eclipse/viatra/solver/language/model/problem/impl/ScopeDeclarationImpl.java')
-rw-r--r-- | org.eclipse.viatra.solver.language.parent/org.eclipse.viatra.solver.language.model/src/main/emf-gen/org/eclipse/viatra/solver/language/model/problem/impl/ScopeDeclarationImpl.java | 153 |
1 files changed, 153 insertions, 0 deletions
diff --git a/org.eclipse.viatra.solver.language.parent/org.eclipse.viatra.solver.language.model/src/main/emf-gen/org/eclipse/viatra/solver/language/model/problem/impl/ScopeDeclarationImpl.java b/org.eclipse.viatra.solver.language.parent/org.eclipse.viatra.solver.language.model/src/main/emf-gen/org/eclipse/viatra/solver/language/model/problem/impl/ScopeDeclarationImpl.java new file mode 100644 index 00000000..f178d9e0 --- /dev/null +++ b/org.eclipse.viatra.solver.language.parent/org.eclipse.viatra.solver.language.model/src/main/emf-gen/org/eclipse/viatra/solver/language/model/problem/impl/ScopeDeclarationImpl.java | |||
@@ -0,0 +1,153 @@ | |||
1 | /** | ||
2 | */ | ||
3 | package org.eclipse.viatra.solver.language.model.problem.impl; | ||
4 | |||
5 | import java.util.Collection; | ||
6 | |||
7 | import org.eclipse.emf.common.notify.NotificationChain; | ||
8 | |||
9 | import org.eclipse.emf.common.util.EList; | ||
10 | |||
11 | import org.eclipse.emf.ecore.EClass; | ||
12 | import org.eclipse.emf.ecore.InternalEObject; | ||
13 | |||
14 | import org.eclipse.emf.ecore.impl.MinimalEObjectImpl; | ||
15 | |||
16 | import org.eclipse.emf.ecore.util.EObjectContainmentEList; | ||
17 | import org.eclipse.emf.ecore.util.InternalEList; | ||
18 | |||
19 | import org.eclipse.viatra.solver.language.model.problem.ProblemPackage; | ||
20 | import org.eclipse.viatra.solver.language.model.problem.ScopeDeclaration; | ||
21 | import org.eclipse.viatra.solver.language.model.problem.TypeScope; | ||
22 | |||
23 | /** | ||
24 | * <!-- begin-user-doc --> | ||
25 | * An implementation of the model object '<em><b>Scope Declaration</b></em>'. | ||
26 | * <!-- end-user-doc --> | ||
27 | * <p> | ||
28 | * The following features are implemented: | ||
29 | * </p> | ||
30 | * <ul> | ||
31 | * <li>{@link org.eclipse.viatra.solver.language.model.problem.impl.ScopeDeclarationImpl#getTypeScopes <em>Type Scopes</em>}</li> | ||
32 | * </ul> | ||
33 | * | ||
34 | * @generated | ||
35 | */ | ||
36 | public class ScopeDeclarationImpl extends MinimalEObjectImpl.Container implements ScopeDeclaration { | ||
37 | /** | ||
38 | * The cached value of the '{@link #getTypeScopes() <em>Type Scopes</em>}' containment reference list. | ||
39 | * <!-- begin-user-doc --> | ||
40 | * <!-- end-user-doc --> | ||
41 | * @see #getTypeScopes() | ||
42 | * @generated | ||
43 | * @ordered | ||
44 | */ | ||
45 | protected EList<TypeScope> typeScopes; | ||
46 | |||
47 | /** | ||
48 | * <!-- begin-user-doc --> | ||
49 | * <!-- end-user-doc --> | ||
50 | * @generated | ||
51 | */ | ||
52 | protected ScopeDeclarationImpl() { | ||
53 | super(); | ||
54 | } | ||
55 | |||
56 | /** | ||
57 | * <!-- begin-user-doc --> | ||
58 | * <!-- end-user-doc --> | ||
59 | * @generated | ||
60 | */ | ||
61 | @Override | ||
62 | protected EClass eStaticClass() { | ||
63 | return ProblemPackage.Literals.SCOPE_DECLARATION; | ||
64 | } | ||
65 | |||
66 | /** | ||
67 | * <!-- begin-user-doc --> | ||
68 | * <!-- end-user-doc --> | ||
69 | * @generated | ||
70 | */ | ||
71 | public EList<TypeScope> getTypeScopes() { | ||
72 | if (typeScopes == null) { | ||
73 | typeScopes = new EObjectContainmentEList<TypeScope>(TypeScope.class, this, | ||
74 | ProblemPackage.SCOPE_DECLARATION__TYPE_SCOPES); | ||
75 | } | ||
76 | return typeScopes; | ||
77 | } | ||
78 | |||
79 | /** | ||
80 | * <!-- begin-user-doc --> | ||
81 | * <!-- end-user-doc --> | ||
82 | * @generated | ||
83 | */ | ||
84 | @Override | ||
85 | public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) { | ||
86 | switch (featureID) { | ||
87 | case ProblemPackage.SCOPE_DECLARATION__TYPE_SCOPES: | ||
88 | return ((InternalEList<?>) getTypeScopes()).basicRemove(otherEnd, msgs); | ||
89 | } | ||
90 | return super.eInverseRemove(otherEnd, featureID, msgs); | ||
91 | } | ||
92 | |||
93 | /** | ||
94 | * <!-- begin-user-doc --> | ||
95 | * <!-- end-user-doc --> | ||
96 | * @generated | ||
97 | */ | ||
98 | @Override | ||
99 | public Object eGet(int featureID, boolean resolve, boolean coreType) { | ||
100 | switch (featureID) { | ||
101 | case ProblemPackage.SCOPE_DECLARATION__TYPE_SCOPES: | ||
102 | return getTypeScopes(); | ||
103 | } | ||
104 | return super.eGet(featureID, resolve, coreType); | ||
105 | } | ||
106 | |||
107 | /** | ||
108 | * <!-- begin-user-doc --> | ||
109 | * <!-- end-user-doc --> | ||
110 | * @generated | ||
111 | */ | ||
112 | @SuppressWarnings("unchecked") | ||
113 | @Override | ||
114 | public void eSet(int featureID, Object newValue) { | ||
115 | switch (featureID) { | ||
116 | case ProblemPackage.SCOPE_DECLARATION__TYPE_SCOPES: | ||
117 | getTypeScopes().clear(); | ||
118 | getTypeScopes().addAll((Collection<? extends TypeScope>) newValue); | ||
119 | return; | ||
120 | } | ||
121 | super.eSet(featureID, newValue); | ||
122 | } | ||
123 | |||
124 | /** | ||
125 | * <!-- begin-user-doc --> | ||
126 | * <!-- end-user-doc --> | ||
127 | * @generated | ||
128 | */ | ||
129 | @Override | ||
130 | public void eUnset(int featureID) { | ||
131 | switch (featureID) { | ||
132 | case ProblemPackage.SCOPE_DECLARATION__TYPE_SCOPES: | ||
133 | getTypeScopes().clear(); | ||
134 | return; | ||
135 | } | ||
136 | super.eUnset(featureID); | ||
137 | } | ||
138 | |||
139 | /** | ||
140 | * <!-- begin-user-doc --> | ||
141 | * <!-- end-user-doc --> | ||
142 | * @generated | ||
143 | */ | ||
144 | @Override | ||
145 | public boolean eIsSet(int featureID) { | ||
146 | switch (featureID) { | ||
147 | case ProblemPackage.SCOPE_DECLARATION__TYPE_SCOPES: | ||
148 | return typeScopes != null && !typeScopes.isEmpty(); | ||
149 | } | ||
150 | return super.eIsSet(featureID); | ||
151 | } | ||
152 | |||
153 | } //ScopeDeclarationImpl | ||