aboutsummaryrefslogtreecommitdiffstats
path: root/Tests/MODELS2020-CaseStudies/models20.diversity-calculator/src/familytree/util/FamilytreeSwitch.java
diff options
context:
space:
mode:
Diffstat (limited to 'Tests/MODELS2020-CaseStudies/models20.diversity-calculator/src/familytree/util/FamilytreeSwitch.java')
-rw-r--r--Tests/MODELS2020-CaseStudies/models20.diversity-calculator/src/familytree/util/FamilytreeSwitch.java131
1 files changed, 131 insertions, 0 deletions
diff --git a/Tests/MODELS2020-CaseStudies/models20.diversity-calculator/src/familytree/util/FamilytreeSwitch.java b/Tests/MODELS2020-CaseStudies/models20.diversity-calculator/src/familytree/util/FamilytreeSwitch.java
new file mode 100644
index 00000000..75bbce3d
--- /dev/null
+++ b/Tests/MODELS2020-CaseStudies/models20.diversity-calculator/src/familytree/util/FamilytreeSwitch.java
@@ -0,0 +1,131 @@
1/**
2 */
3package familytree.util;
4
5import familytree.*;
6
7import org.eclipse.emf.ecore.EObject;
8import org.eclipse.emf.ecore.EPackage;
9
10import org.eclipse.emf.ecore.util.Switch;
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 familytree.FamilytreePackage
23 * @generated
24 */
25public class FamilytreeSwitch<T> extends Switch<T> {
26 /**
27 * The cached model package
28 * <!-- begin-user-doc -->
29 * <!-- end-user-doc -->
30 * @generated
31 */
32 protected static FamilytreePackage modelPackage;
33
34 /**
35 * Creates an instance of the switch.
36 * <!-- begin-user-doc -->
37 * <!-- end-user-doc -->
38 * @generated
39 */
40 public FamilytreeSwitch() {
41 if (modelPackage == null) {
42 modelPackage = FamilytreePackage.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 FamilytreePackage.FAMILY_TREE: {
70 FamilyTree familyTree = (FamilyTree)theEObject;
71 T result = caseFamilyTree(familyTree);
72 if (result == null) result = defaultCase(theEObject);
73 return result;
74 }
75 case FamilytreePackage.MEMBER: {
76 Member member = (Member)theEObject;
77 T result = caseMember(member);
78 if (result == null) result = defaultCase(theEObject);
79 return result;
80 }
81 default: return defaultCase(theEObject);
82 }
83 }
84
85 /**
86 * Returns the result of interpreting the object as an instance of '<em>Family Tree</em>'.
87 * <!-- begin-user-doc -->
88 * This implementation returns null;
89 * returning a non-null result will terminate the switch.
90 * <!-- end-user-doc -->
91 * @param object the target of the switch.
92 * @return the result of interpreting the object as an instance of '<em>Family Tree</em>'.
93 * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
94 * @generated
95 */
96 public T caseFamilyTree(FamilyTree object) {
97 return null;
98 }
99
100 /**
101 * Returns the result of interpreting the object as an instance of '<em>Member</em>'.
102 * <!-- begin-user-doc -->
103 * This implementation returns null;
104 * returning a non-null result will terminate the switch.
105 * <!-- end-user-doc -->
106 * @param object the target of the switch.
107 * @return the result of interpreting the object as an instance of '<em>Member</em>'.
108 * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
109 * @generated
110 */
111 public T caseMember(Member object) {
112 return null;
113 }
114
115 /**
116 * Returns the result of interpreting the object as an instance of '<em>EObject</em>'.
117 * <!-- begin-user-doc -->
118 * This implementation returns null;
119 * returning a non-null result will terminate the switch, but this is the last case anyway.
120 * <!-- end-user-doc -->
121 * @param object the target of the switch.
122 * @return the result of interpreting the object as an instance of '<em>EObject</em>'.
123 * @see #doSwitch(org.eclipse.emf.ecore.EObject)
124 * @generated
125 */
126 @Override
127 public T defaultCase(EObject object) {
128 return null;
129 }
130
131} //FamilytreeSwitch