diff options
Diffstat (limited to 'plugins/org.eclipse.qvtd.pivot.qvtimperative/emf-gen/org/eclipse/qvtd/pivot/qvtimperative/util/QVTimperativeSwitch.java')
-rw-r--r-- | plugins/org.eclipse.qvtd.pivot.qvtimperative/emf-gen/org/eclipse/qvtd/pivot/qvtimperative/util/QVTimperativeSwitch.java | 419 |
1 files changed, 419 insertions, 0 deletions
diff --git a/plugins/org.eclipse.qvtd.pivot.qvtimperative/emf-gen/org/eclipse/qvtd/pivot/qvtimperative/util/QVTimperativeSwitch.java b/plugins/org.eclipse.qvtd.pivot.qvtimperative/emf-gen/org/eclipse/qvtd/pivot/qvtimperative/util/QVTimperativeSwitch.java new file mode 100644 index 000000000..be9864808 --- /dev/null +++ b/plugins/org.eclipse.qvtd.pivot.qvtimperative/emf-gen/org/eclipse/qvtd/pivot/qvtimperative/util/QVTimperativeSwitch.java @@ -0,0 +1,419 @@ +/** + * <copyright> + * + * Copyright (c) 2013 E.D.Willink and others. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * E.D.Willink - initial API and implementation + * + * </copyright> + */ +package org.eclipse.qvtd.pivot.qvtimperative.util; + +import org.eclipse.emf.ecore.EObject; +import org.eclipse.emf.ecore.EPackage; +import org.eclipse.emf.ecore.util.Switch; +import org.eclipse.ocl.examples.domain.elements.Nameable; +import org.eclipse.ocl.examples.pivot.Element; +import org.eclipse.ocl.examples.pivot.NamedElement; +import org.eclipse.ocl.examples.pivot.Namespace; +import org.eclipse.ocl.examples.pivot.OCLExpression; +import org.eclipse.ocl.examples.pivot.ReferringElement; +import org.eclipse.ocl.examples.pivot.Root; +import org.eclipse.ocl.examples.pivot.TypedElement; +import org.eclipse.ocl.examples.pivot.util.Visitable; +import org.eclipse.qvtd.pivot.qvtbase.BaseModel; +import org.eclipse.qvtd.pivot.qvtbase.Rule; +import org.eclipse.qvtd.pivot.qvtcorebase.AbstractMapping; +import org.eclipse.qvtd.pivot.qvtcorebase.Area; +import org.eclipse.qvtd.pivot.qvtimperative.ImperativeModel; +import org.eclipse.qvtd.pivot.qvtimperative.Mapping; +import org.eclipse.qvtd.pivot.qvtimperative.MappingCall; +import org.eclipse.qvtd.pivot.qvtimperative.MappingCallBinding; +import org.eclipse.qvtd.pivot.qvtimperative.QVTimperativePackage; + +/** + * <!-- 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.qvtd.pivot.qvtimperative.QVTimperativePackage + * @generated + */ +public class QVTimperativeSwitch<T> extends Switch<T> { + /** + * The cached model package + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + protected static QVTimperativePackage modelPackage; + + /** + * Creates an instance of the switch. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public QVTimperativeSwitch() { + if (modelPackage == null) { + modelPackage = QVTimperativePackage.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 QVTimperativePackage.IMPERATIVE_MODEL: { + ImperativeModel imperativeModel = (ImperativeModel)theEObject; + T result = caseImperativeModel(imperativeModel); + if (result == null) result = caseBaseModel(imperativeModel); + if (result == null) result = caseRoot(imperativeModel); + if (result == null) result = caseNamespace(imperativeModel); + if (result == null) result = caseNamedElement(imperativeModel); + if (result == null) result = caseElement(imperativeModel); + if (result == null) result = caseNameable(imperativeModel); + if (result == null) result = caseVisitable(imperativeModel); + if (result == null) result = defaultCase(theEObject); + return result; + } + case QVTimperativePackage.MAPPING: { + Mapping mapping = (Mapping)theEObject; + T result = caseMapping(mapping); + if (result == null) result = caseAbstractMapping(mapping); + if (result == null) result = caseRule(mapping); + if (result == null) result = caseArea(mapping); + if (result == null) result = caseNamedElement(mapping); + if (result == null) result = caseElement(mapping); + if (result == null) result = caseNameable(mapping); + if (result == null) result = caseVisitable(mapping); + if (result == null) result = defaultCase(theEObject); + return result; + } + case QVTimperativePackage.MAPPING_CALL: { + MappingCall mappingCall = (MappingCall)theEObject; + T result = caseMappingCall(mappingCall); + if (result == null) result = caseOCLExpression(mappingCall); + if (result == null) result = caseReferringElement(mappingCall); + if (result == null) result = caseTypedElement(mappingCall); + if (result == null) result = caseNamedElement(mappingCall); + if (result == null) result = caseElement(mappingCall); + if (result == null) result = caseNameable(mappingCall); + if (result == null) result = caseVisitable(mappingCall); + if (result == null) result = defaultCase(theEObject); + return result; + } + case QVTimperativePackage.MAPPING_CALL_BINDING: { + MappingCallBinding mappingCallBinding = (MappingCallBinding)theEObject; + T result = caseMappingCallBinding(mappingCallBinding); + if (result == null) result = caseElement(mappingCallBinding); + if (result == null) result = caseReferringElement(mappingCallBinding); + if (result == null) result = caseVisitable(mappingCallBinding); + if (result == null) result = defaultCase(theEObject); + return result; + } + default: return defaultCase(theEObject); + } + } + + /** + * Returns the result of interpreting the object as an instance of '<em>Imperative Model</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>Imperative Model</em>'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseImperativeModel(ImperativeModel object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of '<em>Area</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>Area</em>'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseArea(Area object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of '<em>Abstract Mapping</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>Abstract Mapping</em>'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseAbstractMapping(AbstractMapping object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of '<em>Mapping</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>Mapping</em>'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseMapping(Mapping object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of '<em>Mapping Call</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>Mapping Call</em>'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseMappingCall(MappingCall object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of '<em>Mapping Call 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>Mapping Call Binding</em>'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseMappingCallBinding(MappingCallBinding object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of '<em>Visitable</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>Visitable</em>'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseVisitable(Visitable object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of '<em>Element</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>Element</em>'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseElement(Element object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of '<em>Nameable</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>Nameable</em>'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseNameable(Nameable object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of '<em>Named Element</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>Named Element</em>'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseNamedElement(NamedElement object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of '<em>Namespace</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>Namespace</em>'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseNamespace(Namespace object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of '<em>Root</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>Root</em>'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseRoot(Root object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of '<em>Base Model</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>Base Model</em>'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseBaseModel(BaseModel object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of '<em>Rule</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>Rule</em>'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseRule(Rule object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of '<em>Typed Element</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>Typed Element</em>'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseTypedElement(TypedElement object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of '<em>OCL 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>OCL Expression</em>'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseOCLExpression(OCLExpression object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of '<em>Referring Element</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>Referring Element</em>'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseReferringElement(ReferringElement 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; + } + +} //QVTimperativeSwitch |