org.contextmapper.dsl.contextMappingDSL.util.ContextMappingDSLSwitch Maven / Gradle / Ivy
/**
* generated by Xtext 2.21.0
*/
package org.contextmapper.dsl.contextMappingDSL.util;
import org.contextmapper.dsl.contextMappingDSL.*;
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 org.contextmapper.dsl.contextMappingDSL.ContextMappingDSLPackage
* @generated
*/
public class ContextMappingDSLSwitch extends Switch
{
/**
* The cached model package
*
*
* @generated
*/
protected static ContextMappingDSLPackage modelPackage;
/**
* Creates an instance of the switch.
*
*
* @generated
*/
public ContextMappingDSLSwitch()
{
if (modelPackage == null)
{
modelPackage = ContextMappingDSLPackage.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 ContextMappingDSLPackage.CONTEXT_MAPPING_MODEL:
{
ContextMappingModel contextMappingModel = (ContextMappingModel)theEObject;
T result = caseContextMappingModel(contextMappingModel);
if (result == null) result = defaultCase(theEObject);
return result;
}
case ContextMappingDSLPackage.IMPORT:
{
Import import_ = (Import)theEObject;
T result = caseImport(import_);
if (result == null) result = defaultCase(theEObject);
return result;
}
case ContextMappingDSLPackage.CONTEXT_MAP:
{
ContextMap contextMap = (ContextMap)theEObject;
T result = caseContextMap(contextMap);
if (result == null) result = defaultCase(theEObject);
return result;
}
case ContextMappingDSLPackage.BOUNDED_CONTEXT:
{
BoundedContext boundedContext = (BoundedContext)theEObject;
T result = caseBoundedContext(boundedContext);
if (result == null) result = defaultCase(theEObject);
return result;
}
case ContextMappingDSLPackage.DOMAIN_PART:
{
DomainPart domainPart = (DomainPart)theEObject;
T result = caseDomainPart(domainPart);
if (result == null) result = defaultCase(theEObject);
return result;
}
case ContextMappingDSLPackage.DOMAIN:
{
Domain domain = (Domain)theEObject;
T result = caseDomain(domain);
if (result == null) result = caseDomainPart(domain);
if (result == null) result = defaultCase(theEObject);
return result;
}
case ContextMappingDSLPackage.SUBDOMAIN:
{
Subdomain subdomain = (Subdomain)theEObject;
T result = caseSubdomain(subdomain);
if (result == null) result = caseDomainPart(subdomain);
if (result == null) result = defaultCase(theEObject);
return result;
}
case ContextMappingDSLPackage.RELATIONSHIP:
{
Relationship relationship = (Relationship)theEObject;
T result = caseRelationship(relationship);
if (result == null) result = defaultCase(theEObject);
return result;
}
case ContextMappingDSLPackage.SYMMETRIC_RELATIONSHIP:
{
SymmetricRelationship symmetricRelationship = (SymmetricRelationship)theEObject;
T result = caseSymmetricRelationship(symmetricRelationship);
if (result == null) result = caseRelationship(symmetricRelationship);
if (result == null) result = defaultCase(theEObject);
return result;
}
case ContextMappingDSLPackage.PARTNERSHIP:
{
Partnership partnership = (Partnership)theEObject;
T result = casePartnership(partnership);
if (result == null) result = caseSymmetricRelationship(partnership);
if (result == null) result = caseRelationship(partnership);
if (result == null) result = defaultCase(theEObject);
return result;
}
case ContextMappingDSLPackage.SHARED_KERNEL:
{
SharedKernel sharedKernel = (SharedKernel)theEObject;
T result = caseSharedKernel(sharedKernel);
if (result == null) result = caseSymmetricRelationship(sharedKernel);
if (result == null) result = caseRelationship(sharedKernel);
if (result == null) result = defaultCase(theEObject);
return result;
}
case ContextMappingDSLPackage.UPSTREAM_DOWNSTREAM_RELATIONSHIP:
{
UpstreamDownstreamRelationship upstreamDownstreamRelationship = (UpstreamDownstreamRelationship)theEObject;
T result = caseUpstreamDownstreamRelationship(upstreamDownstreamRelationship);
if (result == null) result = caseRelationship(upstreamDownstreamRelationship);
if (result == null) result = defaultCase(theEObject);
return result;
}
case ContextMappingDSLPackage.CUSTOMER_SUPPLIER_RELATIONSHIP:
{
CustomerSupplierRelationship customerSupplierRelationship = (CustomerSupplierRelationship)theEObject;
T result = caseCustomerSupplierRelationship(customerSupplierRelationship);
if (result == null) result = caseUpstreamDownstreamRelationship(customerSupplierRelationship);
if (result == null) result = caseRelationship(customerSupplierRelationship);
if (result == null) result = defaultCase(theEObject);
return result;
}
case ContextMappingDSLPackage.AGGREGATE:
{
Aggregate aggregate = (Aggregate)theEObject;
T result = caseAggregate(aggregate);
if (result == null) result = defaultCase(theEObject);
return result;
}
case ContextMappingDSLPackage.USER_REQUIREMENT:
{
UserRequirement userRequirement = (UserRequirement)theEObject;
T result = caseUserRequirement(userRequirement);
if (result == null) result = defaultCase(theEObject);
return result;
}
case ContextMappingDSLPackage.USE_CASE:
{
UseCase useCase = (UseCase)theEObject;
T result = caseUseCase(useCase);
if (result == null) result = caseUserRequirement(useCase);
if (result == null) result = defaultCase(theEObject);
return result;
}
case ContextMappingDSLPackage.USER_STORY:
{
UserStory userStory = (UserStory)theEObject;
T result = caseUserStory(userStory);
if (result == null) result = caseUserRequirement(userStory);
if (result == null) result = defaultCase(theEObject);
return result;
}
case ContextMappingDSLPackage.FEATURE:
{
Feature feature = (Feature)theEObject;
T result = caseFeature(feature);
if (result == null) result = defaultCase(theEObject);
return result;
}
case ContextMappingDSLPackage.SCULPTOR_MODULE:
{
SculptorModule sculptorModule = (SculptorModule)theEObject;
T result = caseSculptorModule(sculptorModule);
if (result == null) result = defaultCase(theEObject);
return result;
}
default: return defaultCase(theEObject);
}
}
/**
* Returns the result of interpreting the object as an instance of 'Context Mapping Model'.
*
* 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 'Context Mapping Model'.
* @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
* @generated
*/
public T caseContextMappingModel(ContextMappingModel object)
{
return null;
}
/**
* Returns the result of interpreting the object as an instance of 'Import'.
*
* 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 'Import'.
* @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
* @generated
*/
public T caseImport(Import object)
{
return null;
}
/**
* Returns the result of interpreting the object as an instance of 'Context Map'.
*
* 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 'Context Map'.
* @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
* @generated
*/
public T caseContextMap(ContextMap object)
{
return null;
}
/**
* Returns the result of interpreting the object as an instance of 'Bounded Context'.
*
* 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 'Bounded Context'.
* @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
* @generated
*/
public T caseBoundedContext(BoundedContext object)
{
return null;
}
/**
* Returns the result of interpreting the object as an instance of 'Domain Part'.
*
* 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 'Domain Part'.
* @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
* @generated
*/
public T caseDomainPart(DomainPart object)
{
return null;
}
/**
* Returns the result of interpreting the object as an instance of 'Domain'.
*
* 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 'Domain'.
* @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
* @generated
*/
public T caseDomain(Domain object)
{
return null;
}
/**
* Returns the result of interpreting the object as an instance of 'Subdomain'.
*
* 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 'Subdomain'.
* @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
* @generated
*/
public T caseSubdomain(Subdomain object)
{
return null;
}
/**
* Returns the result of interpreting the object as an instance of 'Relationship'.
*
* 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 'Relationship'.
* @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
* @generated
*/
public T caseRelationship(Relationship object)
{
return null;
}
/**
* Returns the result of interpreting the object as an instance of 'Symmetric Relationship'.
*
* 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 'Symmetric Relationship'.
* @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
* @generated
*/
public T caseSymmetricRelationship(SymmetricRelationship object)
{
return null;
}
/**
* Returns the result of interpreting the object as an instance of 'Partnership'.
*
* 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 'Partnership'.
* @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
* @generated
*/
public T casePartnership(Partnership object)
{
return null;
}
/**
* Returns the result of interpreting the object as an instance of 'Shared Kernel'.
*
* 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 'Shared Kernel'.
* @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
* @generated
*/
public T caseSharedKernel(SharedKernel object)
{
return null;
}
/**
* Returns the result of interpreting the object as an instance of 'Upstream Downstream Relationship'.
*
* 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 'Upstream Downstream Relationship'.
* @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
* @generated
*/
public T caseUpstreamDownstreamRelationship(UpstreamDownstreamRelationship object)
{
return null;
}
/**
* Returns the result of interpreting the object as an instance of 'Customer Supplier Relationship'.
*
* 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 'Customer Supplier Relationship'.
* @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
* @generated
*/
public T caseCustomerSupplierRelationship(CustomerSupplierRelationship object)
{
return null;
}
/**
* Returns the result of interpreting the object as an instance of 'Aggregate'.
*
* 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 'Aggregate'.
* @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
* @generated
*/
public T caseAggregate(Aggregate object)
{
return null;
}
/**
* Returns the result of interpreting the object as an instance of 'User 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 'User Requirement'.
* @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
* @generated
*/
public T caseUserRequirement(UserRequirement object)
{
return null;
}
/**
* Returns the result of interpreting the object as an instance of 'Use Case'.
*
* 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 'Use Case'.
* @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
* @generated
*/
public T caseUseCase(UseCase object)
{
return null;
}
/**
* Returns the result of interpreting the object as an instance of 'User Story'.
*
* 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 'User Story'.
* @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
* @generated
*/
public T caseUserStory(UserStory object)
{
return null;
}
/**
* Returns the result of interpreting the object as an instance of 'Feature'.
*
* 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 'Feature'.
* @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
* @generated
*/
public T caseFeature(Feature object)
{
return null;
}
/**
* Returns the result of interpreting the object as an instance of 'Sculptor Module'.
*
* 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 'Sculptor Module'.
* @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
* @generated
*/
public T caseSculptorModule(SculptorModule 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;
}
} //ContextMappingDSLSwitch