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