/** | |
* Copyright (c)2020 CEA LIST, Committer Name, and others. | |
* | |
* All rights reserved. This program and the accompanying materials | |
* are made available under the terms of the Eclipse Public License 2.0 | |
* which accompanies this distribution, and is available at | |
* https://www.eclipse.org/legal/epl-2.0/ | |
* | |
* SPDX-License-Identifier: EPL-2.0 | |
* | |
* Contributors: | |
* CEA LIST - Initial API and implementation | |
* Gabriel Pedroza (CEA LIST) gabriel.pedroza@cea.fr | |
* Patrick Tessier (CEA LIST) Patrick.tessier@cea.fr | |
* | |
*/ | |
package org.eclipse.papyrus.pdp4eng.designer.profile.pdp4engDesign.util; | |
import org.eclipse.emf.ecore.EObject; | |
import org.eclipse.emf.ecore.EPackage; | |
import org.eclipse.emf.ecore.util.Switch; | |
import org.eclipse.papyrus.pdp4eng.designer.profile.pdp4engDesign.CallProcess; | |
import org.eclipse.papyrus.pdp4eng.designer.profile.pdp4engDesign.CompositeData; | |
import org.eclipse.papyrus.pdp4eng.designer.profile.pdp4engDesign.Data; | |
import org.eclipse.papyrus.pdp4eng.designer.profile.pdp4engDesign.DataInput; | |
import org.eclipse.papyrus.pdp4eng.designer.profile.pdp4engDesign.DataLink; | |
import org.eclipse.papyrus.pdp4eng.designer.profile.pdp4engDesign.DataOutput; | |
import org.eclipse.papyrus.pdp4eng.designer.profile.pdp4engDesign.DataStore; | |
import org.eclipse.papyrus.pdp4eng.designer.profile.pdp4engDesign.DataType; | |
import org.eclipse.papyrus.pdp4eng.designer.profile.pdp4engDesign.Entity; | |
import org.eclipse.papyrus.pdp4eng.designer.profile.pdp4engDesign.ExternalEntity; | |
import org.eclipse.papyrus.pdp4eng.designer.profile.pdp4engDesign.OpaqueData; | |
import org.eclipse.papyrus.pdp4eng.designer.profile.pdp4engDesign.SmartGridFrame; | |
import org.eclipse.papyrus.pdp4eng.designer.profile.pdp4engDesign.Table; | |
import org.eclipse.papyrus.pdp4eng.designer.profile.pdp4engDesign.isPersonalData; | |
import org.eclipse.papyrus.pdp4eng.designer.profile.pdp4engDesign.pdp4engDesignPackage; | |
/** | |
* <!-- 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.pdp4eng.designer.profile.pdp4engDesign.pdp4engDesignPackage | |
* @generated | |
*/ | |
public class pdp4engDesignSwitch<T> extends Switch<T> { | |
/** | |
* The cached model package | |
* <!-- begin-user-doc --> | |
* <!-- end-user-doc --> | |
* @generated | |
*/ | |
protected static pdp4engDesignPackage modelPackage; | |
/** | |
* Creates an instance of the switch. | |
* <!-- begin-user-doc --> | |
* <!-- end-user-doc --> | |
* @generated | |
*/ | |
public pdp4engDesignSwitch() { | |
if (modelPackage == null) { | |
modelPackage = pdp4engDesignPackage.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 pdp4engDesignPackage.OPAQUE_DATA: { | |
OpaqueData opaqueData = (OpaqueData)theEObject; | |
T result = caseOpaqueData(opaqueData); | |
if (result == null) result = caseDataType(opaqueData); | |
if (result == null) result = defaultCase(theEObject); | |
return result; | |
} | |
case pdp4engDesignPackage.DATA_TYPE: { | |
DataType dataType = (DataType)theEObject; | |
T result = caseDataType(dataType); | |
if (result == null) result = defaultCase(theEObject); | |
return result; | |
} | |
case pdp4engDesignPackage.IS_PERSONAL_DATA: { | |
isPersonalData isPersonalData = (isPersonalData)theEObject; | |
T result = caseisPersonalData(isPersonalData); | |
if (result == null) result = defaultCase(theEObject); | |
return result; | |
} | |
case pdp4engDesignPackage.DATA_OUTPUT: { | |
DataOutput dataOutput = (DataOutput)theEObject; | |
T result = caseDataOutput(dataOutput); | |
if (result == null) result = defaultCase(theEObject); | |
return result; | |
} | |
case pdp4engDesignPackage.DATA: { | |
Data data = (Data)theEObject; | |
T result = caseData(data); | |
if (result == null) result = defaultCase(theEObject); | |
return result; | |
} | |
case pdp4engDesignPackage.DATA_LINK: { | |
DataLink dataLink = (DataLink)theEObject; | |
T result = caseDataLink(dataLink); | |
if (result == null) result = caseData(dataLink); | |
if (result == null) result = defaultCase(theEObject); | |
return result; | |
} | |
case pdp4engDesignPackage.COMPOSITE_DATA: { | |
CompositeData compositeData = (CompositeData)theEObject; | |
T result = caseCompositeData(compositeData); | |
if (result == null) result = caseData(compositeData); | |
if (result == null) result = defaultCase(theEObject); | |
return result; | |
} | |
case pdp4engDesignPackage.TABLE: { | |
Table table = (Table)theEObject; | |
T result = caseTable(table); | |
if (result == null) result = caseData(table); | |
if (result == null) result = defaultCase(theEObject); | |
return result; | |
} | |
case pdp4engDesignPackage.EXTERNAL_ENTITY: { | |
ExternalEntity externalEntity = (ExternalEntity)theEObject; | |
T result = caseExternalEntity(externalEntity); | |
if (result == null) result = defaultCase(theEObject); | |
return result; | |
} | |
case pdp4engDesignPackage.ENTITY: { | |
Entity entity = (Entity)theEObject; | |
T result = caseEntity(entity); | |
if (result == null) result = defaultCase(theEObject); | |
return result; | |
} | |
case pdp4engDesignPackage.DATA_STORE: { | |
DataStore dataStore = (DataStore)theEObject; | |
T result = caseDataStore(dataStore); | |
if (result == null) result = defaultCase(theEObject); | |
return result; | |
} | |
case pdp4engDesignPackage.DATA_INPUT: { | |
DataInput dataInput = (DataInput)theEObject; | |
T result = caseDataInput(dataInput); | |
if (result == null) result = defaultCase(theEObject); | |
return result; | |
} | |
case pdp4engDesignPackage.PROCESS: { | |
org.eclipse.papyrus.pdp4eng.designer.profile.pdp4engDesign.Process process = (org.eclipse.papyrus.pdp4eng.designer.profile.pdp4engDesign.Process)theEObject; | |
T result = caseProcess(process); | |
if (result == null) result = defaultCase(theEObject); | |
return result; | |
} | |
case pdp4engDesignPackage.CALL_PROCESS: { | |
CallProcess callProcess = (CallProcess)theEObject; | |
T result = caseCallProcess(callProcess); | |
if (result == null) result = defaultCase(theEObject); | |
return result; | |
} | |
case pdp4engDesignPackage.SMART_GRID_FRAME: { | |
SmartGridFrame smartGridFrame = (SmartGridFrame)theEObject; | |
T result = caseSmartGridFrame(smartGridFrame); | |
if (result == null) result = caseData(smartGridFrame); | |
if (result == null) result = defaultCase(theEObject); | |
return result; | |
} | |
default: return defaultCase(theEObject); | |
} | |
} | |
/** | |
* Returns the result of interpreting the object as an instance of '<em>Opaque Data</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>Opaque Data</em>'. | |
* @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) | |
* @generated | |
*/ | |
public T caseOpaqueData(OpaqueData object) { | |
return null; | |
} | |
/** | |
* Returns the result of interpreting the object as an instance of '<em>Data Type</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>Data Type</em>'. | |
* @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) | |
* @generated | |
*/ | |
public T caseDataType(DataType object) { | |
return null; | |
} | |
/** | |
* Returns the result of interpreting the object as an instance of '<em>is Personal Data</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>is Personal Data</em>'. | |
* @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) | |
* @generated | |
*/ | |
public T caseisPersonalData(isPersonalData object) { | |
return null; | |
} | |
/** | |
* Returns the result of interpreting the object as an instance of '<em>Data Output</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>Data Output</em>'. | |
* @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) | |
* @generated | |
*/ | |
public T caseDataOutput(DataOutput object) { | |
return null; | |
} | |
/** | |
* Returns the result of interpreting the object as an instance of '<em>Data</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>Data</em>'. | |
* @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) | |
* @generated | |
*/ | |
public T caseData(Data object) { | |
return null; | |
} | |
/** | |
* Returns the result of interpreting the object as an instance of '<em>Data Link</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>Data Link</em>'. | |
* @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) | |
* @generated | |
*/ | |
public T caseDataLink(DataLink object) { | |
return null; | |
} | |
/** | |
* Returns the result of interpreting the object as an instance of '<em>Composite Data</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>Composite Data</em>'. | |
* @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) | |
* @generated | |
*/ | |
public T caseCompositeData(CompositeData object) { | |
return null; | |
} | |
/** | |
* Returns the result of interpreting the object as an instance of '<em>Table</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>Table</em>'. | |
* @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) | |
* @generated | |
*/ | |
public T caseTable(Table object) { | |
return null; | |
} | |
/** | |
* Returns the result of interpreting the object as an instance of '<em>External Entity</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 Entity</em>'. | |
* @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) | |
* @generated | |
*/ | |
public T caseExternalEntity(ExternalEntity object) { | |
return null; | |
} | |
/** | |
* Returns the result of interpreting the object as an instance of '<em>Entity</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>Entity</em>'. | |
* @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) | |
* @generated | |
*/ | |
public T caseEntity(Entity object) { | |
return null; | |
} | |
/** | |
* Returns the result of interpreting the object as an instance of '<em>Data Store</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>Data Store</em>'. | |
* @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) | |
* @generated | |
*/ | |
public T caseDataStore(DataStore object) { | |
return null; | |
} | |
/** | |
* Returns the result of interpreting the object as an instance of '<em>Data Input</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>Data Input</em>'. | |
* @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) | |
* @generated | |
*/ | |
public T caseDataInput(DataInput object) { | |
return null; | |
} | |
/** | |
* Returns the result of interpreting the object as an instance of '<em>Process</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>Process</em>'. | |
* @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) | |
* @generated | |
*/ | |
public T caseProcess(org.eclipse.papyrus.pdp4eng.designer.profile.pdp4engDesign.Process object) { | |
return null; | |
} | |
/** | |
* Returns the result of interpreting the object as an instance of '<em>Call Process</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>Call Process</em>'. | |
* @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) | |
* @generated | |
*/ | |
public T caseCallProcess(CallProcess object) { | |
return null; | |
} | |
/** | |
* Returns the result of interpreting the object as an instance of '<em>Smart Grid Frame</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>Smart Grid Frame</em>'. | |
* @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) | |
* @generated | |
*/ | |
public T caseSmartGridFrame(SmartGridFrame 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; | |
} | |
} //pdp4engDesignSwitch |