| /** |
| */ |
| package org.eclipse.papyrus.designer.languages.java.profile.PapyrusJava.util; |
| |
| import org.eclipse.emf.ecore.EObject; |
| import org.eclipse.emf.ecore.EPackage; |
| |
| import org.eclipse.emf.ecore.util.Switch; |
| |
| import org.eclipse.papyrus.designer.languages.java.profile.PapyrusJava.*; |
| |
| /** |
| * <!-- 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.eclipse.papyrus.designer.languages.java.profile.PapyrusJava.PapyrusJavaPackage |
| * @generated |
| */ |
| public class PapyrusJavaSwitch<T> extends Switch<T> { |
| /** |
| * The cached model package |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| protected static PapyrusJavaPackage modelPackage; |
| |
| /** |
| * Creates an instance of the switch. |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public PapyrusJavaSwitch() { |
| if (modelPackage == null) { |
| modelPackage = PapyrusJavaPackage.eINSTANCE; |
| } |
| } |
| |
| /** |
| * Checks whether this is a switch for the given package. |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @param 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 PapyrusJavaPackage.ARRAY: { |
| Array array = (Array)theEObject; |
| T result = caseArray(array); |
| if (result == null) result = defaultCase(theEObject); |
| return result; |
| } |
| case PapyrusJavaPackage.EXTERNAL: { |
| External external = (External)theEObject; |
| T result = caseExternal(external); |
| if (result == null) result = defaultCase(theEObject); |
| return result; |
| } |
| case PapyrusJavaPackage.EXTERN_LIBRARY: { |
| ExternLibrary externLibrary = (ExternLibrary)theEObject; |
| T result = caseExternLibrary(externLibrary); |
| if (result == null) result = defaultCase(theEObject); |
| return result; |
| } |
| case PapyrusJavaPackage.IMPORT: { |
| Import import_ = (Import)theEObject; |
| T result = caseImport(import_); |
| if (result == null) result = defaultCase(theEObject); |
| return result; |
| } |
| case PapyrusJavaPackage.NO_CODE_GEN: { |
| NoCodeGen noCodeGen = (NoCodeGen)theEObject; |
| T result = caseNoCodeGen(noCodeGen); |
| if (result == null) result = defaultCase(theEObject); |
| return result; |
| } |
| case PapyrusJavaPackage.TEMPLATE: { |
| Template template = (Template)theEObject; |
| T result = caseTemplate(template); |
| if (result == null) result = defaultCase(theEObject); |
| return result; |
| } |
| case PapyrusJavaPackage.TEMPLATE_BINDING: { |
| TemplateBinding templateBinding = (TemplateBinding)theEObject; |
| T result = caseTemplateBinding(templateBinding); |
| if (result == null) result = defaultCase(theEObject); |
| return result; |
| } |
| case PapyrusJavaPackage.TEMPLATE_PARAMETER: { |
| TemplateParameter templateParameter = (TemplateParameter)theEObject; |
| T result = caseTemplateParameter(templateParameter); |
| if (result == null) result = defaultCase(theEObject); |
| return result; |
| } |
| case PapyrusJavaPackage.MANUAL_GENERATION: { |
| ManualGeneration manualGeneration = (ManualGeneration)theEObject; |
| T result = caseManualGeneration(manualGeneration); |
| if (result == null) result = defaultCase(theEObject); |
| return result; |
| } |
| case PapyrusJavaPackage.VARIADIC: { |
| Variadic variadic = (Variadic)theEObject; |
| T result = caseVariadic(variadic); |
| if (result == null) result = defaultCase(theEObject); |
| return result; |
| } |
| case PapyrusJavaPackage.VOLATILE: { |
| Volatile volatile_ = (Volatile)theEObject; |
| T result = caseVolatile(volatile_); |
| if (result == null) result = defaultCase(theEObject); |
| return result; |
| } |
| case PapyrusJavaPackage.TRANSIENT: { |
| Transient transient_ = (Transient)theEObject; |
| T result = caseTransient(transient_); |
| if (result == null) result = defaultCase(theEObject); |
| return result; |
| } |
| case PapyrusJavaPackage.SYNCHRONIZED: { |
| Synchronized synchronized_ = (Synchronized)theEObject; |
| T result = caseSynchronized(synchronized_); |
| if (result == null) result = defaultCase(theEObject); |
| return result; |
| } |
| case PapyrusJavaPackage.STRICTFP: { |
| Strictfp strictfp_ = (Strictfp)theEObject; |
| T result = caseStrictfp(strictfp_); |
| if (result == null) result = defaultCase(theEObject); |
| return result; |
| } |
| case PapyrusJavaPackage.NATIVE: { |
| Native native_ = (Native)theEObject; |
| T result = caseNative(native_); |
| if (result == null) result = defaultCase(theEObject); |
| return result; |
| } |
| case PapyrusJavaPackage.DEFAULT: { |
| Default default_ = (Default)theEObject; |
| T result = caseDefault(default_); |
| if (result == null) result = defaultCase(theEObject); |
| return result; |
| } |
| case PapyrusJavaPackage.STATIC_CLASSIFIER: { |
| StaticClassifier staticClassifier = (StaticClassifier)theEObject; |
| T result = caseStaticClassifier(staticClassifier); |
| if (result == null) result = defaultCase(theEObject); |
| return result; |
| } |
| case PapyrusJavaPackage.FINAL: { |
| Final final_ = (Final)theEObject; |
| T result = caseFinal(final_); |
| if (result == null) result = defaultCase(theEObject); |
| return result; |
| } |
| default: return defaultCase(theEObject); |
| } |
| } |
| |
| /** |
| * Returns the result of interpreting the object as an instance of '<em>Array</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>Array</em>'. |
| * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) |
| * @generated |
| */ |
| public T caseArray(Array object) { |
| return null; |
| } |
| |
| /** |
| * Returns the result of interpreting the object as an instance of '<em>External</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>External</em>'. |
| * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) |
| * @generated |
| */ |
| public T caseExternal(External object) { |
| return null; |
| } |
| |
| /** |
| * Returns the result of interpreting the object as an instance of '<em>Extern Library</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>Extern Library</em>'. |
| * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) |
| * @generated |
| */ |
| public T caseExternLibrary(ExternLibrary object) { |
| return null; |
| } |
| |
| /** |
| * Returns the result of interpreting the object as an instance of '<em>Import</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>Import</em>'. |
| * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) |
| * @generated |
| */ |
| public T caseImport(Import object) { |
| return null; |
| } |
| |
| /** |
| * Returns the result of interpreting the object as an instance of '<em>No Code Gen</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>No Code Gen</em>'. |
| * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) |
| * @generated |
| */ |
| public T caseNoCodeGen(NoCodeGen object) { |
| return null; |
| } |
| |
| /** |
| * Returns the result of interpreting the object as an instance of '<em>Template</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>Template</em>'. |
| * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) |
| * @generated |
| */ |
| public T caseTemplate(Template object) { |
| return null; |
| } |
| |
| /** |
| * Returns the result of interpreting the object as an instance of '<em>Template Binding</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>Template Binding</em>'. |
| * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) |
| * @generated |
| */ |
| public T caseTemplateBinding(TemplateBinding object) { |
| return null; |
| } |
| |
| /** |
| * Returns the result of interpreting the object as an instance of '<em>Template Parameter</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>Template Parameter</em>'. |
| * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) |
| * @generated |
| */ |
| public T caseTemplateParameter(TemplateParameter object) { |
| return null; |
| } |
| |
| /** |
| * Returns the result of interpreting the object as an instance of '<em>Manual Generation</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>Manual Generation</em>'. |
| * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) |
| * @generated |
| */ |
| public T caseManualGeneration(ManualGeneration object) { |
| return null; |
| } |
| |
| /** |
| * Returns the result of interpreting the object as an instance of '<em>Variadic</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>Variadic</em>'. |
| * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) |
| * @generated |
| */ |
| public T caseVariadic(Variadic object) { |
| return null; |
| } |
| |
| /** |
| * Returns the result of interpreting the object as an instance of '<em>Volatile</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>Volatile</em>'. |
| * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) |
| * @generated |
| */ |
| public T caseVolatile(Volatile object) { |
| return null; |
| } |
| |
| /** |
| * Returns the result of interpreting the object as an instance of '<em>Transient</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>Transient</em>'. |
| * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) |
| * @generated |
| */ |
| public T caseTransient(Transient object) { |
| return null; |
| } |
| |
| /** |
| * Returns the result of interpreting the object as an instance of '<em>Synchronized</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>Synchronized</em>'. |
| * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) |
| * @generated |
| */ |
| public T caseSynchronized(Synchronized object) { |
| return null; |
| } |
| |
| /** |
| * Returns the result of interpreting the object as an instance of '<em>Strictfp</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>Strictfp</em>'. |
| * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) |
| * @generated |
| */ |
| public T caseStrictfp(Strictfp object) { |
| return null; |
| } |
| |
| /** |
| * Returns the result of interpreting the object as an instance of '<em>Native</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>Native</em>'. |
| * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) |
| * @generated |
| */ |
| public T caseNative(Native object) { |
| return null; |
| } |
| |
| /** |
| * Returns the result of interpreting the object as an instance of '<em>Default</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>Default</em>'. |
| * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) |
| * @generated |
| */ |
| public T caseDefault(Default object) { |
| return null; |
| } |
| |
| /** |
| * Returns the result of interpreting the object as an instance of '<em>Static Classifier</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>Static Classifier</em>'. |
| * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) |
| * @generated |
| */ |
| public T caseStaticClassifier(StaticClassifier object) { |
| return null; |
| } |
| |
| /** |
| * Returns the result of interpreting the object as an instance of '<em>Final</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>Final</em>'. |
| * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) |
| * @generated |
| */ |
| public T caseFinal(Final 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; |
| } |
| |
| } //PapyrusJavaSwitch |