aboutsummaryrefslogtreecommitdiffstats
path: root/Metrics/ca.mcgill.ecse.dslreasoner.realistic.metrics/src/simpleStatechart/util/SimpleStatechartSwitch.java
diff options
context:
space:
mode:
Diffstat (limited to 'Metrics/ca.mcgill.ecse.dslreasoner.realistic.metrics/src/simpleStatechart/util/SimpleStatechartSwitch.java')
-rw-r--r--Metrics/ca.mcgill.ecse.dslreasoner.realistic.metrics/src/simpleStatechart/util/SimpleStatechartSwitch.java152
1 files changed, 152 insertions, 0 deletions
diff --git a/Metrics/ca.mcgill.ecse.dslreasoner.realistic.metrics/src/simpleStatechart/util/SimpleStatechartSwitch.java b/Metrics/ca.mcgill.ecse.dslreasoner.realistic.metrics/src/simpleStatechart/util/SimpleStatechartSwitch.java
new file mode 100644
index 00000000..30c60e74
--- /dev/null
+++ b/Metrics/ca.mcgill.ecse.dslreasoner.realistic.metrics/src/simpleStatechart/util/SimpleStatechartSwitch.java
@@ -0,0 +1,152 @@
1/**
2 */
3package simpleStatechart.util;
4
5import org.eclipse.emf.ecore.EObject;
6import org.eclipse.emf.ecore.EPackage;
7
8import org.eclipse.emf.ecore.util.Switch;
9
10import simpleStatechart.*;
11
12/**
13 * <!-- begin-user-doc -->
14 * The <b>Switch</b> for the model's inheritance hierarchy.
15 * It supports the call {@link #doSwitch(EObject) doSwitch(object)}
16 * to invoke the <code>caseXXX</code> method for each class of the model,
17 * starting with the actual class of the object
18 * and proceeding up the inheritance hierarchy
19 * until a non-null result is returned,
20 * which is the result of the switch.
21 * <!-- end-user-doc -->
22 * @see simpleStatechart.SimpleStatechartPackage
23 * @generated
24 */
25public class SimpleStatechartSwitch<T> extends Switch<T> {
26 /**
27 * The cached model package
28 * <!-- begin-user-doc -->
29 * <!-- end-user-doc -->
30 * @generated
31 */
32 protected static SimpleStatechartPackage modelPackage;
33
34 /**
35 * Creates an instance of the switch.
36 * <!-- begin-user-doc -->
37 * <!-- end-user-doc -->
38 * @generated
39 */
40 public SimpleStatechartSwitch() {
41 if (modelPackage == null) {
42 modelPackage = SimpleStatechartPackage.eINSTANCE;
43 }
44 }
45
46 /**
47 * Checks whether this is a switch for the given package.
48 * <!-- begin-user-doc -->
49 * <!-- end-user-doc -->
50 * @param ePackage the package in question.
51 * @return whether this is a switch for the given package.
52 * @generated
53 */
54 @Override
55 protected boolean isSwitchFor(EPackage ePackage) {
56 return ePackage == modelPackage;
57 }
58
59 /**
60 * Calls <code>caseXXX</code> for each class of the model until one returns a non null result; it yields that result.
61 * <!-- begin-user-doc -->
62 * <!-- end-user-doc -->
63 * @return the first non-null result returned by a <code>caseXXX</code> call.
64 * @generated
65 */
66 @Override
67 protected T doSwitch(int classifierID, EObject theEObject) {
68 switch (classifierID) {
69 case SimpleStatechartPackage.STATE: {
70 State state = (State)theEObject;
71 T result = caseState(state);
72 if (result == null) result = defaultCase(theEObject);
73 return result;
74 }
75 case SimpleStatechartPackage.ENTRY: {
76 Entry entry = (Entry)theEObject;
77 T result = caseEntry(entry);
78 if (result == null) result = defaultCase(theEObject);
79 return result;
80 }
81 case SimpleStatechartPackage.STATECHART: {
82 Statechart statechart = (Statechart)theEObject;
83 T result = caseStatechart(statechart);
84 if (result == null) result = defaultCase(theEObject);
85 return result;
86 }
87 default: return defaultCase(theEObject);
88 }
89 }
90
91 /**
92 * Returns the result of interpreting the object as an instance of '<em>State</em>'.
93 * <!-- begin-user-doc -->
94 * This implementation returns null;
95 * returning a non-null result will terminate the switch.
96 * <!-- end-user-doc -->
97 * @param object the target of the switch.
98 * @return the result of interpreting the object as an instance of '<em>State</em>'.
99 * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
100 * @generated
101 */
102 public T caseState(State object) {
103 return null;
104 }
105
106 /**
107 * Returns the result of interpreting the object as an instance of '<em>Entry</em>'.
108 * <!-- begin-user-doc -->
109 * This implementation returns null;
110 * returning a non-null result will terminate the switch.
111 * <!-- end-user-doc -->
112 * @param object the target of the switch.
113 * @return the result of interpreting the object as an instance of '<em>Entry</em>'.
114 * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
115 * @generated
116 */
117 public T caseEntry(Entry object) {
118 return null;
119 }
120
121 /**
122 * Returns the result of interpreting the object as an instance of '<em>Statechart</em>'.
123 * <!-- begin-user-doc -->
124 * This implementation returns null;
125 * returning a non-null result will terminate the switch.
126 * <!-- end-user-doc -->
127 * @param object the target of the switch.
128 * @return the result of interpreting the object as an instance of '<em>Statechart</em>'.
129 * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
130 * @generated
131 */
132 public T caseStatechart(Statechart object) {
133 return null;
134 }
135
136 /**
137 * Returns the result of interpreting the object as an instance of '<em>EObject</em>'.
138 * <!-- begin-user-doc -->
139 * This implementation returns null;
140 * returning a non-null result will terminate the switch, but this is the last case anyway.
141 * <!-- end-user-doc -->
142 * @param object the target of the switch.
143 * @return the result of interpreting the object as an instance of '<em>EObject</em>'.
144 * @see #doSwitch(org.eclipse.emf.ecore.EObject)
145 * @generated
146 */
147 @Override
148 public T defaultCase(EObject object) {
149 return null;
150 }
151
152} //SimpleStatechartSwitch