diff options
Diffstat (limited to 'plugins/infra/architecture/org.eclipse.papyrus.infra.architecture.representation/src-gen/org/eclipse/papyrus/infra/architecture/representation/util/RepresentationSwitch.java')
-rw-r--r-- | plugins/infra/architecture/org.eclipse.papyrus.infra.architecture.representation/src-gen/org/eclipse/papyrus/infra/architecture/representation/util/RepresentationSwitch.java | 279 |
1 files changed, 279 insertions, 0 deletions
diff --git a/plugins/infra/architecture/org.eclipse.papyrus.infra.architecture.representation/src-gen/org/eclipse/papyrus/infra/architecture/representation/util/RepresentationSwitch.java b/plugins/infra/architecture/org.eclipse.papyrus.infra.architecture.representation/src-gen/org/eclipse/papyrus/infra/architecture/representation/util/RepresentationSwitch.java new file mode 100644 index 00000000000..8b02aab277f --- /dev/null +++ b/plugins/infra/architecture/org.eclipse.papyrus.infra.architecture.representation/src-gen/org/eclipse/papyrus/infra/architecture/representation/util/RepresentationSwitch.java @@ -0,0 +1,279 @@ +/** + * Copyright (c) 2016 CEA LIST. + * + * 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: + * Maged Elaasar - Initial API and implementation + * + * + */ +package org.eclipse.papyrus.infra.architecture.representation.util; + +import org.eclipse.emf.ecore.EObject; +import org.eclipse.emf.ecore.EPackage; + +import org.eclipse.emf.ecore.util.Switch; +import org.eclipse.papyrus.infra.architecture.representation.*; +import org.eclipse.papyrus.infra.constraints.DisplayUnit; + +import org.eclipse.papyrus.infra.core.architecture.ADElement; +import org.eclipse.papyrus.infra.core.architecture.RepresentationKind; + +/** + * <!-- 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.infra.architecture.representation.RepresentationPackage + * @generated + */ +public class RepresentationSwitch<T> extends Switch<T> { + /** + * The cached model package + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + protected static RepresentationPackage modelPackage; + + /** + * Creates an instance of the switch. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public RepresentationSwitch() { + if (modelPackage == null) { + modelPackage = RepresentationPackage.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 RepresentationPackage.PAPYRUS_REPRESENTATION_KIND: { + PapyrusRepresentationKind papyrusRepresentationKind = (PapyrusRepresentationKind)theEObject; + T result = casePapyrusRepresentationKind(papyrusRepresentationKind); + if (result == null) result = caseRepresentationKind(papyrusRepresentationKind); + if (result == null) result = caseADElement(papyrusRepresentationKind); + if (result == null) result = defaultCase(theEObject); + return result; + } + case RepresentationPackage.RULE: { + Rule rule = (Rule)theEObject; + T result = caseRule(rule); + if (result == null) result = defaultCase(theEObject); + return result; + } + case RepresentationPackage.MODEL_RULE: { + ModelRule modelRule = (ModelRule)theEObject; + T result = caseModelRule(modelRule); + if (result == null) result = caseRule(modelRule); + if (result == null) result = caseDisplayUnit(modelRule); + if (result == null) result = defaultCase(theEObject); + return result; + } + case RepresentationPackage.OWNING_RULE: { + OwningRule owningRule = (OwningRule)theEObject; + T result = caseOwningRule(owningRule); + if (result == null) result = caseRule(owningRule); + if (result == null) result = defaultCase(theEObject); + return result; + } + case RepresentationPackage.MODEL_AUTO_CREATE: { + ModelAutoCreate modelAutoCreate = (ModelAutoCreate)theEObject; + T result = caseModelAutoCreate(modelAutoCreate); + if (result == null) result = defaultCase(theEObject); + return result; + } + case RepresentationPackage.ROOT_AUTO_SELECT: { + RootAutoSelect rootAutoSelect = (RootAutoSelect)theEObject; + T result = caseRootAutoSelect(rootAutoSelect); + if (result == null) result = defaultCase(theEObject); + return result; + } + default: return defaultCase(theEObject); + } + } + + /** + * Returns the result of interpreting the object as an instance of '<em>Papyrus Representation Kind</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>Papyrus Representation Kind</em>'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T casePapyrusRepresentationKind(PapyrusRepresentationKind 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>Model 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>Model Rule</em>'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseModelRule(ModelRule object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of '<em>Owning 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>Owning Rule</em>'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseOwningRule(OwningRule object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of '<em>Model Auto Create</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>Model Auto Create</em>'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseModelAutoCreate(ModelAutoCreate object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of '<em>Root Auto Select</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 Auto Select</em>'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseRootAutoSelect(RootAutoSelect object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of '<em>AD 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>AD Element</em>'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseADElement(ADElement object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of '<em>Representation Kind</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>Representation Kind</em>'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseRepresentationKind(RepresentationKind object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of '<em>Display Unit</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>Display Unit</em>'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseDisplayUnit(DisplayUnit 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; + } + +} //RepresentationSwitch |