$search
00001 00003 package org.best.of.robotics.smachDSL.util; 00004 00005 import org.best.of.robotics.smachDSL.*; 00006 00007 import org.eclipse.emf.ecore.EObject; 00008 import org.eclipse.emf.ecore.EPackage; 00009 00010 import org.eclipse.emf.ecore.util.Switch; 00011 00025 public class SmachDSLSwitch<T> extends Switch<T> 00026 { 00033 protected static SmachDSLPackage modelPackage; 00034 00041 public SmachDSLSwitch() 00042 { 00043 if (modelPackage == null) 00044 { 00045 modelPackage = SmachDSLPackage.eINSTANCE; 00046 } 00047 } 00048 00057 @Override 00058 protected boolean isSwitchFor(EPackage ePackage) 00059 { 00060 return ePackage == modelPackage; 00061 } 00062 00070 @Override 00071 protected T doSwitch(int classifierID, EObject theEObject) 00072 { 00073 switch (classifierID) 00074 { 00075 case SmachDSLPackage.PRIMITIVE_PACKAGE: 00076 { 00077 PrimitivePackage primitivePackage = (PrimitivePackage)theEObject; 00078 T result = casePrimitivePackage(primitivePackage); 00079 if (result == null) result = defaultCase(theEObject); 00080 return result; 00081 } 00082 case SmachDSLPackage.TEST: 00083 { 00084 Test test = (Test)theEObject; 00085 T result = caseTest(test); 00086 if (result == null) result = defaultCase(theEObject); 00087 return result; 00088 } 00089 case SmachDSLPackage.STATE_MACHINE: 00090 { 00091 StateMachine stateMachine = (StateMachine)theEObject; 00092 T result = caseStateMachine(stateMachine); 00093 if (result == null) result = defaultCase(theEObject); 00094 return result; 00095 } 00096 case SmachDSLPackage.ACTION_CLIENT: 00097 { 00098 ActionClient actionClient = (ActionClient)theEObject; 00099 T result = caseActionClient(actionClient); 00100 if (result == null) result = defaultCase(theEObject); 00101 return result; 00102 } 00103 case SmachDSLPackage.SERVICE_CLIENT: 00104 { 00105 ServiceClient serviceClient = (ServiceClient)theEObject; 00106 T result = caseServiceClient(serviceClient); 00107 if (result == null) result = defaultCase(theEObject); 00108 return result; 00109 } 00110 case SmachDSLPackage.ACTION_STATE: 00111 { 00112 ActionState actionState = (ActionState)theEObject; 00113 T result = caseActionState(actionState); 00114 if (result == null) result = defaultCase(theEObject); 00115 return result; 00116 } 00117 case SmachDSLPackage.TRANSITION: 00118 { 00119 Transition transition = (Transition)theEObject; 00120 T result = caseTransition(transition); 00121 if (result == null) result = defaultCase(theEObject); 00122 return result; 00123 } 00124 default: return defaultCase(theEObject); 00125 } 00126 } 00127 00139 public T casePrimitivePackage(PrimitivePackage object) 00140 { 00141 return null; 00142 } 00143 00155 public T caseTest(Test object) 00156 { 00157 return null; 00158 } 00159 00171 public T caseStateMachine(StateMachine object) 00172 { 00173 return null; 00174 } 00175 00187 public T caseActionClient(ActionClient object) 00188 { 00189 return null; 00190 } 00191 00203 public T caseServiceClient(ServiceClient object) 00204 { 00205 return null; 00206 } 00207 00219 public T caseActionState(ActionState object) 00220 { 00221 return null; 00222 } 00223 00235 public T caseTransition(Transition object) 00236 { 00237 return null; 00238 } 00239 00251 @Override 00252 public T defaultCase(EObject object) 00253 { 00254 return null; 00255 } 00256 00257 } //SmachDSLSwitch