diff options
Diffstat (limited to 'Tests/ca.mcgill.ecse.dslreasoner.standalone.test/src/ca/mcgill/ecse/dslreasoner/standalone/test/filesystem/impl/DirImpl.java')
-rw-r--r-- | Tests/ca.mcgill.ecse.dslreasoner.standalone.test/src/ca/mcgill/ecse/dslreasoner/standalone/test/filesystem/impl/DirImpl.java | 165 |
1 files changed, 165 insertions, 0 deletions
diff --git a/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/src/ca/mcgill/ecse/dslreasoner/standalone/test/filesystem/impl/DirImpl.java b/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/src/ca/mcgill/ecse/dslreasoner/standalone/test/filesystem/impl/DirImpl.java new file mode 100644 index 00000000..2e2fbcba --- /dev/null +++ b/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/src/ca/mcgill/ecse/dslreasoner/standalone/test/filesystem/impl/DirImpl.java | |||
@@ -0,0 +1,165 @@ | |||
1 | /** | ||
2 | */ | ||
3 | package ca.mcgill.ecse.dslreasoner.standalone.test.filesystem.impl; | ||
4 | |||
5 | import ca.mcgill.ecse.dslreasoner.standalone.test.filesystem.Dir; | ||
6 | import ca.mcgill.ecse.dslreasoner.standalone.test.filesystem.FSObject; | ||
7 | import ca.mcgill.ecse.dslreasoner.standalone.test.filesystem.filesystemPackage; | ||
8 | |||
9 | import java.util.Collection; | ||
10 | |||
11 | import org.eclipse.emf.common.notify.NotificationChain; | ||
12 | |||
13 | import org.eclipse.emf.common.util.EList; | ||
14 | |||
15 | import org.eclipse.emf.ecore.EClass; | ||
16 | import org.eclipse.emf.ecore.InternalEObject; | ||
17 | |||
18 | import org.eclipse.emf.ecore.util.EObjectContainmentWithInverseEList; | ||
19 | import org.eclipse.emf.ecore.util.InternalEList; | ||
20 | |||
21 | /** | ||
22 | * <!-- begin-user-doc --> | ||
23 | * An implementation of the model object '<em><b>Dir</b></em>'. | ||
24 | * <!-- end-user-doc --> | ||
25 | * <p> | ||
26 | * The following features are implemented: | ||
27 | * </p> | ||
28 | * <ul> | ||
29 | * <li>{@link ca.mcgill.ecse.dslreasoner.standalone.test.filesystem.impl.DirImpl#getContents <em>Contents</em>}</li> | ||
30 | * </ul> | ||
31 | * | ||
32 | * @generated | ||
33 | */ | ||
34 | public class DirImpl extends FSObjectImpl implements Dir { | ||
35 | /** | ||
36 | * The cached value of the '{@link #getContents() <em>Contents</em>}' containment reference list. | ||
37 | * <!-- begin-user-doc --> | ||
38 | * <!-- end-user-doc --> | ||
39 | * @see #getContents() | ||
40 | * @generated | ||
41 | * @ordered | ||
42 | */ | ||
43 | protected EList<FSObject> contents; | ||
44 | |||
45 | /** | ||
46 | * <!-- begin-user-doc --> | ||
47 | * <!-- end-user-doc --> | ||
48 | * @generated | ||
49 | */ | ||
50 | protected DirImpl() { | ||
51 | super(); | ||
52 | } | ||
53 | |||
54 | /** | ||
55 | * <!-- begin-user-doc --> | ||
56 | * <!-- end-user-doc --> | ||
57 | * @generated | ||
58 | */ | ||
59 | @Override | ||
60 | protected EClass eStaticClass() { | ||
61 | return filesystemPackage.Literals.DIR; | ||
62 | } | ||
63 | |||
64 | /** | ||
65 | * <!-- begin-user-doc --> | ||
66 | * <!-- end-user-doc --> | ||
67 | * @generated | ||
68 | */ | ||
69 | public EList<FSObject> getContents() { | ||
70 | if (contents == null) { | ||
71 | contents = new EObjectContainmentWithInverseEList<FSObject>(FSObject.class, this, filesystemPackage.DIR__CONTENTS, filesystemPackage.FS_OBJECT__PARENT); | ||
72 | } | ||
73 | return contents; | ||
74 | } | ||
75 | |||
76 | /** | ||
77 | * <!-- begin-user-doc --> | ||
78 | * <!-- end-user-doc --> | ||
79 | * @generated | ||
80 | */ | ||
81 | @SuppressWarnings("unchecked") | ||
82 | @Override | ||
83 | public NotificationChain eInverseAdd(InternalEObject otherEnd, int featureID, NotificationChain msgs) { | ||
84 | switch (featureID) { | ||
85 | case filesystemPackage.DIR__CONTENTS: | ||
86 | return ((InternalEList<InternalEObject>)(InternalEList<?>)getContents()).basicAdd(otherEnd, msgs); | ||
87 | } | ||
88 | return super.eInverseAdd(otherEnd, featureID, msgs); | ||
89 | } | ||
90 | |||
91 | /** | ||
92 | * <!-- begin-user-doc --> | ||
93 | * <!-- end-user-doc --> | ||
94 | * @generated | ||
95 | */ | ||
96 | @Override | ||
97 | public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) { | ||
98 | switch (featureID) { | ||
99 | case filesystemPackage.DIR__CONTENTS: | ||
100 | return ((InternalEList<?>)getContents()).basicRemove(otherEnd, msgs); | ||
101 | } | ||
102 | return super.eInverseRemove(otherEnd, featureID, msgs); | ||
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 filesystemPackage.DIR__CONTENTS: | ||
114 | return getContents(); | ||
115 | } | ||
116 | return super.eGet(featureID, resolve, coreType); | ||
117 | } | ||
118 | |||
119 | /** | ||
120 | * <!-- begin-user-doc --> | ||
121 | * <!-- end-user-doc --> | ||
122 | * @generated | ||
123 | */ | ||
124 | @SuppressWarnings("unchecked") | ||
125 | @Override | ||
126 | public void eSet(int featureID, Object newValue) { | ||
127 | switch (featureID) { | ||
128 | case filesystemPackage.DIR__CONTENTS: | ||
129 | getContents().clear(); | ||
130 | getContents().addAll((Collection<? extends FSObject>)newValue); | ||
131 | return; | ||
132 | } | ||
133 | super.eSet(featureID, newValue); | ||
134 | } | ||
135 | |||
136 | /** | ||
137 | * <!-- begin-user-doc --> | ||
138 | * <!-- end-user-doc --> | ||
139 | * @generated | ||
140 | */ | ||
141 | @Override | ||
142 | public void eUnset(int featureID) { | ||
143 | switch (featureID) { | ||
144 | case filesystemPackage.DIR__CONTENTS: | ||
145 | getContents().clear(); | ||
146 | return; | ||
147 | } | ||
148 | super.eUnset(featureID); | ||
149 | } | ||
150 | |||
151 | /** | ||
152 | * <!-- begin-user-doc --> | ||
153 | * <!-- end-user-doc --> | ||
154 | * @generated | ||
155 | */ | ||
156 | @Override | ||
157 | public boolean eIsSet(int featureID) { | ||
158 | switch (featureID) { | ||
159 | case filesystemPackage.DIR__CONTENTS: | ||
160 | return contents != null && !contents.isEmpty(); | ||
161 | } | ||
162 | return super.eIsSet(featureID); | ||
163 | } | ||
164 | |||
165 | } //DirImpl | ||