/**
*/
package hu.bme.mit.inf.dslreasoner.domains.cps.util;
import hu.bme.mit.inf.dslreasoner.domains.cps.*;
import org.eclipse.emf.ecore.EObject;
import org.eclipse.emf.ecore.EPackage;
import org.eclipse.emf.ecore.util.Switch;
/**
*
* The Switch for the model's inheritance hierarchy.
* It supports the call {@link #doSwitch(EObject) doSwitch(object)}
* to invoke the caseXXX
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.
*
* @see hu.bme.mit.inf.dslreasoner.domains.cps.CpsPackage
* @generated
*/
public class CpsSwitch extends Switch {
/**
* The cached model package
*
*
* @generated
*/
protected static CpsPackage modelPackage;
/**
* Creates an instance of the switch.
*
*
* @generated
*/
public CpsSwitch() {
if (modelPackage == null) {
modelPackage = CpsPackage.eINSTANCE;
}
}
/**
* Checks whether this is a switch for the given package.
*
*
* @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 caseXXX
for each class of the model until one returns a non null result; it yields that result.
*
*
* @return the first non-null result returned by a caseXXX
call.
* @generated
*/
@Override
protected T doSwitch(int classifierID, EObject theEObject) {
switch (classifierID) {
case CpsPackage.CYBER_PHYSICAL_SYSTEM: {
CyberPhysicalSystem cyberPhysicalSystem = (CyberPhysicalSystem) theEObject;
T result = caseCyberPhysicalSystem(cyberPhysicalSystem);
if (result == null)
result = defaultCase(theEObject);
return result;
}
case CpsPackage.APPLICATION_TYPE: {
ApplicationType applicationType = (ApplicationType) theEObject;
T result = caseApplicationType(applicationType);
if (result == null)
result = defaultCase(theEObject);
return result;
}
case CpsPackage.HOST_TYPE: {
HostType hostType = (HostType) theEObject;
T result = caseHostType(hostType);
if (result == null)
result = defaultCase(theEObject);
return result;
}
case CpsPackage.REQUEST: {
Request request = (Request) theEObject;
T result = caseRequest(request);
if (result == null)
result = defaultCase(theEObject);
return result;
}
case CpsPackage.REQUIREMENT: {
Requirement requirement = (Requirement) theEObject;
T result = caseRequirement(requirement);
if (result == null)
result = defaultCase(theEObject);
return result;
}
case CpsPackage.APPLICATION_INSTANCE: {
ApplicationInstance applicationInstance = (ApplicationInstance) theEObject;
T result = caseApplicationInstance(applicationInstance);
if (result == null)
result = defaultCase(theEObject);
return result;
}
case CpsPackage.RESOURCE_REQUIREMENT: {
ResourceRequirement resourceRequirement = (ResourceRequirement) theEObject;
T result = caseResourceRequirement(resourceRequirement);
if (result == null)
result = defaultCase(theEObject);
return result;
}
case CpsPackage.HOST_INSTANCE: {
HostInstance hostInstance = (HostInstance) theEObject;
T result = caseHostInstance(hostInstance);
if (result == null)
result = defaultCase(theEObject);
return result;
}
default:
return defaultCase(theEObject);
}
}
/**
* Returns the result of interpreting the object as an instance of 'Cyber Physical System'.
*
* This implementation returns null;
* returning a non-null result will terminate the switch.
*
* @param object the target of the switch.
* @return the result of interpreting the object as an instance of 'Cyber Physical System'.
* @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
* @generated
*/
public T caseCyberPhysicalSystem(CyberPhysicalSystem object) {
return null;
}
/**
* Returns the result of interpreting the object as an instance of 'Application Type'.
*
* This implementation returns null;
* returning a non-null result will terminate the switch.
*
* @param object the target of the switch.
* @return the result of interpreting the object as an instance of 'Application Type'.
* @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
* @generated
*/
public T caseApplicationType(ApplicationType object) {
return null;
}
/**
* Returns the result of interpreting the object as an instance of 'Host Type'.
*
* This implementation returns null;
* returning a non-null result will terminate the switch.
*
* @param object the target of the switch.
* @return the result of interpreting the object as an instance of 'Host Type'.
* @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
* @generated
*/
public T caseHostType(HostType object) {
return null;
}
/**
* Returns the result of interpreting the object as an instance of 'Request'.
*
* This implementation returns null;
* returning a non-null result will terminate the switch.
*
* @param object the target of the switch.
* @return the result of interpreting the object as an instance of 'Request'.
* @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
* @generated
*/
public T caseRequest(Request object) {
return null;
}
/**
* Returns the result of interpreting the object as an instance of 'Requirement'.
*
* This implementation returns null;
* returning a non-null result will terminate the switch.
*
* @param object the target of the switch.
* @return the result of interpreting the object as an instance of 'Requirement'.
* @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
* @generated
*/
public T caseRequirement(Requirement object) {
return null;
}
/**
* Returns the result of interpreting the object as an instance of 'Application Instance'.
*
* This implementation returns null;
* returning a non-null result will terminate the switch.
*
* @param object the target of the switch.
* @return the result of interpreting the object as an instance of 'Application Instance'.
* @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
* @generated
*/
public T caseApplicationInstance(ApplicationInstance object) {
return null;
}
/**
* Returns the result of interpreting the object as an instance of 'Resource Requirement'.
*
* This implementation returns null;
* returning a non-null result will terminate the switch.
*
* @param object the target of the switch.
* @return the result of interpreting the object as an instance of 'Resource Requirement'.
* @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
* @generated
*/
public T caseResourceRequirement(ResourceRequirement object) {
return null;
}
/**
* Returns the result of interpreting the object as an instance of 'Host Instance'.
*
* This implementation returns null;
* returning a non-null result will terminate the switch.
*
* @param object the target of the switch.
* @return the result of interpreting the object as an instance of 'Host Instance'.
* @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
* @generated
*/
public T caseHostInstance(HostInstance object) {
return null;
}
/**
* Returns the result of interpreting the object as an instance of 'EObject'.
*
* This implementation returns null;
* returning a non-null result will terminate the switch, but this is the last case anyway.
*
* @param object the target of the switch.
* @return the result of interpreting the object as an instance of 'EObject'.
* @see #doSwitch(org.eclipse.emf.ecore.EObject)
* @generated
*/
@Override
public T defaultCase(EObject object) {
return null;
}
} //CpsSwitch