/** */ package org.xtest.xTest.util; import org.eclipse.emf.ecore.EObject; import org.eclipse.emf.ecore.EPackage; import org.eclipse.emf.ecore.util.Switch; import org.eclipse.xtend.core.xtend.XtendAnnotationTarget; import org.eclipse.xtend.core.xtend.XtendFunction; import org.eclipse.xtend.core.xtend.XtendMember; import org.eclipse.xtext.xbase.XBlockExpression; import org.eclipse.xtext.xbase.XExpression; import org.xtest.xTest.*; /** * <!-- begin-user-doc --> * The <b>Switch</b> for the model's inheritance hierarchy. * It supports the call {@link #doSwitch(EObject) doSwitch(object)} * to invoke the <code>caseXXX</code> method for each class of the model, * starting with the actual class of the object * and proceeding up the inheritance hierarchy * until a non-null result is returned, * which is the result of the switch. * <!-- end-user-doc --> * @see org.xtest.xTest.XTestPackage * @generated */ public class XTestSwitch<T> extends Switch<T> { /** * The cached model package * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ protected static XTestPackage modelPackage; /** * Creates an instance of the switch. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public XTestSwitch() { if (modelPackage == null) { modelPackage = XTestPackage.eINSTANCE; } } /** * Checks whether this is a switch for the given package. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @parameter ePackage the package in question. * @return whether this is a switch for the given package. * @generated */ @Override protected boolean isSwitchFor(EPackage ePackage) { return ePackage == modelPackage; } /** * Calls <code>caseXXX</code> for each class of the model until one returns a non null result; it yields that result. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @return the first non-null result returned by a <code>caseXXX</code> call. * @generated */ @Override protected T doSwitch(int classifierID, EObject theEObject) { switch (classifierID) { case XTestPackage.FILE_PARAM: { FileParam fileParam = (FileParam)theEObject; T result = caseFileParam(fileParam); if (result == null) result = defaultCase(theEObject); return result; } case XTestPackage.UNIQUE_NAME: { UniqueName uniqueName = (UniqueName)theEObject; T result = caseUniqueName(uniqueName); if (result == null) result = defaultCase(theEObject); return result; } case XTestPackage.BODY: { Body body = (Body)theEObject; T result = caseBody(body); if (result == null) result = caseXBlockExpression(body); if (result == null) result = caseXExpression(body); if (result == null) result = defaultCase(theEObject); return result; } case XTestPackage.XTEST_EXPRESSION: { XTestExpression xTestExpression = (XTestExpression)theEObject; T result = caseXTestExpression(xTestExpression); if (result == null) result = caseXExpression(xTestExpression); if (result == null) result = defaultCase(theEObject); return result; } case XTestPackage.XASSERT_EXPRESSION: { XAssertExpression xAssertExpression = (XAssertExpression)theEObject; T result = caseXAssertExpression(xAssertExpression); if (result == null) result = caseXExpression(xAssertExpression); if (result == null) result = defaultCase(theEObject); return result; } case XTestPackage.XMETHOD_DEF: { XMethodDef xMethodDef = (XMethodDef)theEObject; T result = caseXMethodDef(xMethodDef); if (result == null) result = caseXtendFunction(xMethodDef); if (result == null) result = caseXtendMember(xMethodDef); if (result == null) result = caseXtendAnnotationTarget(xMethodDef); if (result == null) result = defaultCase(theEObject); return result; } case XTestPackage.XMETHOD_DEF_EXPRESSION: { XMethodDefExpression xMethodDefExpression = (XMethodDefExpression)theEObject; T result = caseXMethodDefExpression(xMethodDefExpression); if (result == null) result = caseXExpression(xMethodDefExpression); if (result == null) result = defaultCase(theEObject); return result; } default: return defaultCase(theEObject); } } /** * Returns the result of interpreting the object as an instance of '<em>File Param</em>'. * <!-- begin-user-doc --> * This implementation returns null; * returning a non-null result will terminate the switch. * <!-- end-user-doc --> * @param object the target of the switch. * @return the result of interpreting the object as an instance of '<em>File Param</em>'. * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) * @generated */ public T caseFileParam(FileParam object) { return null; } /** * Returns the result of interpreting the object as an instance of '<em>Unique Name</em>'. * <!-- begin-user-doc --> * This implementation returns null; * returning a non-null result will terminate the switch. * <!-- end-user-doc --> * @param object the target of the switch. * @return the result of interpreting the object as an instance of '<em>Unique Name</em>'. * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) * @generated */ public T caseUniqueName(UniqueName object) { return null; } /** * Returns the result of interpreting the object as an instance of '<em>Body</em>'. * <!-- begin-user-doc --> * This implementation returns null; * returning a non-null result will terminate the switch. * <!-- end-user-doc --> * @param object the target of the switch. * @return the result of interpreting the object as an instance of '<em>Body</em>'. * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) * @generated */ public T caseBody(Body object) { return null; } /** * Returns the result of interpreting the object as an instance of '<em>Expression</em>'. * <!-- begin-user-doc --> * This implementation returns null; * returning a non-null result will terminate the switch. * <!-- end-user-doc --> * @param object the target of the switch. * @return the result of interpreting the object as an instance of '<em>Expression</em>'. * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) * @generated */ public T caseXTestExpression(XTestExpression object) { return null; } /** * Returns the result of interpreting the object as an instance of '<em>XAssert Expression</em>'. * <!-- begin-user-doc --> * This implementation returns null; * returning a non-null result will terminate the switch. * <!-- end-user-doc --> * @param object the target of the switch. * @return the result of interpreting the object as an instance of '<em>XAssert Expression</em>'. * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) * @generated */ public T caseXAssertExpression(XAssertExpression object) { return null; } /** * Returns the result of interpreting the object as an instance of '<em>XMethod Def</em>'. * <!-- begin-user-doc --> * This implementation returns null; * returning a non-null result will terminate the switch. * <!-- end-user-doc --> * @param object the target of the switch. * @return the result of interpreting the object as an instance of '<em>XMethod Def</em>'. * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) * @generated */ public T caseXMethodDef(XMethodDef object) { return null; } /** * Returns the result of interpreting the object as an instance of '<em>XMethod Def Expression</em>'. * <!-- begin-user-doc --> * This implementation returns null; * returning a non-null result will terminate the switch. * <!-- end-user-doc --> * @param object the target of the switch. * @return the result of interpreting the object as an instance of '<em>XMethod Def Expression</em>'. * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) * @generated */ public T caseXMethodDefExpression(XMethodDefExpression object) { return null; } /** * Returns the result of interpreting the object as an instance of '<em>XExpression</em>'. * <!-- begin-user-doc --> * This implementation returns null; * returning a non-null result will terminate the switch. * <!-- end-user-doc --> * @param object the target of the switch. * @return the result of interpreting the object as an instance of '<em>XExpression</em>'. * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) * @generated */ public T caseXExpression(XExpression object) { return null; } /** * Returns the result of interpreting the object as an instance of '<em>XBlock Expression</em>'. * <!-- begin-user-doc --> * This implementation returns null; * returning a non-null result will terminate the switch. * <!-- end-user-doc --> * @param object the target of the switch. * @return the result of interpreting the object as an instance of '<em>XBlock Expression</em>'. * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) * @generated */ public T caseXBlockExpression(XBlockExpression object) { return null; } /** * Returns the result of interpreting the object as an instance of '<em>Annotation Target</em>'. * <!-- begin-user-doc --> * This implementation returns null; * returning a non-null result will terminate the switch. * <!-- end-user-doc --> * @param object the target of the switch. * @return the result of interpreting the object as an instance of '<em>Annotation Target</em>'. * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) * @generated */ public T caseXtendAnnotationTarget(XtendAnnotationTarget object) { return null; } /** * Returns the result of interpreting the object as an instance of '<em>Member</em>'. * <!-- begin-user-doc --> * This implementation returns null; * returning a non-null result will terminate the switch. * <!-- end-user-doc --> * @param object the target of the switch. * @return the result of interpreting the object as an instance of '<em>Member</em>'. * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) * @generated */ public T caseXtendMember(XtendMember object) { return null; } /** * Returns the result of interpreting the object as an instance of '<em>Function</em>'. * <!-- begin-user-doc --> * This implementation returns null; * returning a non-null result will terminate the switch. * <!-- end-user-doc --> * @param object the target of the switch. * @return the result of interpreting the object as an instance of '<em>Function</em>'. * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) * @generated */ public T caseXtendFunction(XtendFunction object) { return null; } /** * Returns the result of interpreting the object as an instance of '<em>EObject</em>'. * <!-- begin-user-doc --> * This implementation returns null; * returning a non-null result will terminate the switch, but this is the last case anyway. * <!-- end-user-doc --> * @param object the target of the switch. * @return the result of interpreting the object as an instance of '<em>EObject</em>'. * @see #doSwitch(org.eclipse.emf.ecore.EObject) * @generated */ @Override public T defaultCase(EObject object) { return null; } } //XTestSwitch