blob: bb83a10d1ece6aa9871830ec404046d29dcb7f57 [file] [log] [blame]
/**
* Copyright (c) 2014 Fraunhofer FOKUS
* 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:
* Marc-Florian Wendland
*/
package org.eclipse.upr.soaml.util;
import org.eclipse.emf.ecore.EObject;
import org.eclipse.emf.ecore.EPackage;
import org.eclipse.emf.ecore.util.Switch;
import org.eclipse.upr.soaml.*;
/**
* <!-- 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.upr.soaml.SoaMLPackage
* @generated
*/
public class SoaMLSwitch<T> extends Switch<T> {
/**
* The cached model package
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
protected static SoaMLPackage modelPackage;
/**
* Creates an instance of the switch.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public SoaMLSwitch() {
if (modelPackage == null) {
modelPackage = SoaMLPackage.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 SoaMLPackage.COLLABORATION: {
Collaboration collaboration = (Collaboration)theEObject;
T result = caseCollaboration(collaboration);
if (result == null) result = defaultCase(theEObject);
return result;
}
case SoaMLPackage.SERVICE_ARCHITECTURE: {
ServiceArchitecture serviceArchitecture = (ServiceArchitecture)theEObject;
T result = caseServiceArchitecture(serviceArchitecture);
if (result == null) result = caseCollaboration(serviceArchitecture);
if (result == null) result = defaultCase(theEObject);
return result;
}
case SoaMLPackage.SERVICE_CONTRACT: {
ServiceContract serviceContract = (ServiceContract)theEObject;
T result = caseServiceContract(serviceContract);
if (result == null) result = caseCollaboration(serviceContract);
if (result == null) result = defaultCase(theEObject);
return result;
}
case SoaMLPackage.COLLABORATION_USE: {
CollaborationUse collaborationUse = (CollaborationUse)theEObject;
T result = caseCollaborationUse(collaborationUse);
if (result == null) result = defaultCase(theEObject);
return result;
}
case SoaMLPackage.CONSUMER: {
Consumer consumer = (Consumer)theEObject;
T result = caseConsumer(consumer);
if (result == null) result = defaultCase(theEObject);
return result;
}
case SoaMLPackage.PROVIDER: {
Provider provider = (Provider)theEObject;
T result = caseProvider(provider);
if (result == null) result = defaultCase(theEObject);
return result;
}
case SoaMLPackage.MOTIVATION_REALIZATION: {
MotivationRealization motivationRealization = (MotivationRealization)theEObject;
T result = caseMotivationRealization(motivationRealization);
if (result == null) result = defaultCase(theEObject);
return result;
}
case SoaMLPackage.SERVICE_INTERFACE: {
ServiceInterface serviceInterface = (ServiceInterface)theEObject;
T result = caseServiceInterface(serviceInterface);
if (result == null) result = defaultCase(theEObject);
return result;
}
case SoaMLPackage.PARTICIPANT: {
Participant participant = (Participant)theEObject;
T result = caseParticipant(participant);
if (result == null) result = defaultCase(theEObject);
return result;
}
case SoaMLPackage.AGENT: {
Agent agent = (Agent)theEObject;
T result = caseAgent(agent);
if (result == null) result = caseParticipant(agent);
if (result == null) result = defaultCase(theEObject);
return result;
}
case SoaMLPackage.PORT: {
Port port = (Port)theEObject;
T result = casePort(port);
if (result == null) result = defaultCase(theEObject);
return result;
}
case SoaMLPackage.REQUEST: {
Request request = (Request)theEObject;
T result = caseRequest(request);
if (result == null) result = defaultCase(theEObject);
return result;
}
case SoaMLPackage.SERVICE: {
Service service = (Service)theEObject;
T result = caseService(service);
if (result == null) result = defaultCase(theEObject);
return result;
}
case SoaMLPackage.SERVICE_CHANNEL: {
ServiceChannel serviceChannel = (ServiceChannel)theEObject;
T result = caseServiceChannel(serviceChannel);
if (result == null) result = defaultCase(theEObject);
return result;
}
case SoaMLPackage.PROPERTY: {
Property property = (Property)theEObject;
T result = caseProperty(property);
if (result == null) result = defaultCase(theEObject);
return result;
}
case SoaMLPackage.ATTACHMENT: {
Attachment attachment = (Attachment)theEObject;
T result = caseAttachment(attachment);
if (result == null) result = defaultCase(theEObject);
return result;
}
case SoaMLPackage.MESSAGE_TYPE: {
MessageType messageType = (MessageType)theEObject;
T result = caseMessageType(messageType);
if (result == null) result = defaultCase(theEObject);
return result;
}
case SoaMLPackage.MILESTONE: {
Milestone milestone = (Milestone)theEObject;
T result = caseMilestone(milestone);
if (result == null) result = defaultCase(theEObject);
return result;
}
case SoaMLPackage.CAPABILITY: {
Capability capability = (Capability)theEObject;
T result = caseCapability(capability);
if (result == null) result = defaultCase(theEObject);
return result;
}
case SoaMLPackage.EXPOSE: {
Expose expose = (Expose)theEObject;
T result = caseExpose(expose);
if (result == null) result = defaultCase(theEObject);
return result;
}
case SoaMLPackage.NODE_DESCRIPTOR: {
NodeDescriptor nodeDescriptor = (NodeDescriptor)theEObject;
T result = caseNodeDescriptor(nodeDescriptor);
if (result == null) result = defaultCase(theEObject);
return result;
}
case SoaMLPackage.CATALOG: {
Catalog catalog = (Catalog)theEObject;
T result = caseCatalog(catalog);
if (result == null) result = caseNodeDescriptor(catalog);
if (result == null) result = defaultCase(theEObject);
return result;
}
case SoaMLPackage.CATEGORY: {
Category category = (Category)theEObject;
T result = caseCategory(category);
if (result == null) result = caseNodeDescriptor(category);
if (result == null) result = defaultCase(theEObject);
return result;
}
case SoaMLPackage.FREE_FORM_DESCRIPTOR: {
FreeFormDescriptor freeFormDescriptor = (FreeFormDescriptor)theEObject;
T result = caseFreeFormDescriptor(freeFormDescriptor);
if (result == null) result = defaultCase(theEObject);
return result;
}
case SoaMLPackage.FREE_FORM_VALUE: {
FreeFormValue freeFormValue = (FreeFormValue)theEObject;
T result = caseFreeFormValue(freeFormValue);
if (result == null) result = defaultCase(theEObject);
return result;
}
case SoaMLPackage.CATEGORY_VALUE: {
CategoryValue categoryValue = (CategoryValue)theEObject;
T result = caseCategoryValue(categoryValue);
if (result == null) result = caseFreeFormValue(categoryValue);
if (result == null) result = defaultCase(theEObject);
return result;
}
case SoaMLPackage.CATEGORIZATION: {
Categorization categorization = (Categorization)theEObject;
T result = caseCategorization(categorization);
if (result == null) result = defaultCase(theEObject);
return result;
}
default: return defaultCase(theEObject);
}
}
/**
* Returns the result of interpreting the object as an instance of '<em>Collaboration</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>Collaboration</em>'.
* @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
* @generated
*/
public T caseCollaboration(Collaboration object) {
return null;
}
/**
* Returns the result of interpreting the object as an instance of '<em>Service Architecture</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>Service Architecture</em>'.
* @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
* @generated
*/
public T caseServiceArchitecture(ServiceArchitecture object) {
return null;
}
/**
* Returns the result of interpreting the object as an instance of '<em>Service Contract</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>Service Contract</em>'.
* @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
* @generated
*/
public T caseServiceContract(ServiceContract object) {
return null;
}
/**
* Returns the result of interpreting the object as an instance of '<em>Collaboration Use</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>Collaboration Use</em>'.
* @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
* @generated
*/
public T caseCollaborationUse(CollaborationUse object) {
return null;
}
/**
* Returns the result of interpreting the object as an instance of '<em>Consumer</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>Consumer</em>'.
* @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
* @generated
*/
public T caseConsumer(Consumer object) {
return null;
}
/**
* Returns the result of interpreting the object as an instance of '<em>Provider</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>Provider</em>'.
* @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
* @generated
*/
public T caseProvider(Provider object) {
return null;
}
/**
* Returns the result of interpreting the object as an instance of '<em>Motivation Realization</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>Motivation Realization</em>'.
* @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
* @generated
*/
public T caseMotivationRealization(MotivationRealization object) {
return null;
}
/**
* Returns the result of interpreting the object as an instance of '<em>Service Interface</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>Service Interface</em>'.
* @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
* @generated
*/
public T caseServiceInterface(ServiceInterface object) {
return null;
}
/**
* Returns the result of interpreting the object as an instance of '<em>Participant</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>Participant</em>'.
* @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
* @generated
*/
public T caseParticipant(Participant object) {
return null;
}
/**
* Returns the result of interpreting the object as an instance of '<em>Agent</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>Agent</em>'.
* @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
* @generated
*/
public T caseAgent(Agent object) {
return null;
}
/**
* Returns the result of interpreting the object as an instance of '<em>Port</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>Port</em>'.
* @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
* @generated
*/
public T casePort(Port object) {
return null;
}
/**
* Returns the result of interpreting the object as an instance of '<em>Request</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>Request</em>'.
* @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 '<em>Service</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>Service</em>'.
* @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
* @generated
*/
public T caseService(Service object) {
return null;
}
/**
* Returns the result of interpreting the object as an instance of '<em>Service Channel</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>Service Channel</em>'.
* @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
* @generated
*/
public T caseServiceChannel(ServiceChannel object) {
return null;
}
/**
* Returns the result of interpreting the object as an instance of '<em>Property</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>Property</em>'.
* @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
* @generated
*/
public T caseProperty(Property object) {
return null;
}
/**
* Returns the result of interpreting the object as an instance of '<em>Attachment</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>Attachment</em>'.
* @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
* @generated
*/
public T caseAttachment(Attachment object) {
return null;
}
/**
* Returns the result of interpreting the object as an instance of '<em>Message 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>Message Type</em>'.
* @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
* @generated
*/
public T caseMessageType(MessageType object) {
return null;
}
/**
* Returns the result of interpreting the object as an instance of '<em>Milestone</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>Milestone</em>'.
* @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
* @generated
*/
public T caseMilestone(Milestone object) {
return null;
}
/**
* Returns the result of interpreting the object as an instance of '<em>Capability</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>Capability</em>'.
* @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
* @generated
*/
public T caseCapability(Capability object) {
return null;
}
/**
* Returns the result of interpreting the object as an instance of '<em>Expose</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>Expose</em>'.
* @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
* @generated
*/
public T caseExpose(Expose object) {
return null;
}
/**
* Returns the result of interpreting the object as an instance of '<em>Node Descriptor</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>Node Descriptor</em>'.
* @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
* @generated
*/
public T caseNodeDescriptor(NodeDescriptor object) {
return null;
}
/**
* Returns the result of interpreting the object as an instance of '<em>Catalog</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>Catalog</em>'.
* @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
* @generated
*/
public T caseCatalog(Catalog object) {
return null;
}
/**
* Returns the result of interpreting the object as an instance of '<em>Category</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>Category</em>'.
* @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
* @generated
*/
public T caseCategory(Category object) {
return null;
}
/**
* Returns the result of interpreting the object as an instance of '<em>Free Form Descriptor</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>Free Form Descriptor</em>'.
* @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
* @generated
*/
public T caseFreeFormDescriptor(FreeFormDescriptor object) {
return null;
}
/**
* Returns the result of interpreting the object as an instance of '<em>Free Form Value</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>Free Form Value</em>'.
* @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
* @generated
*/
public T caseFreeFormValue(FreeFormValue object) {
return null;
}
/**
* Returns the result of interpreting the object as an instance of '<em>Category Value</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>Category Value</em>'.
* @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
* @generated
*/
public T caseCategoryValue(CategoryValue object) {
return null;
}
/**
* Returns the result of interpreting the object as an instance of '<em>Categorization</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>Categorization</em>'.
* @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
* @generated
*/
public T caseCategorization(Categorization 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;
}
} //SoaMLSwitch