/*******************************************************************************
* Copyright (c) 2011-2013 University of Mannheim: Chair for Software Engineering
* 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:
* Ralph Gerbig - initial API and implementation and initial documentation
*******************************************************************************/
package de.uni_mannheim.informatik.swt.models.plm.PLM.util;
import de.uni_mannheim.informatik.swt.models.plm.PLM.*;
import org.eclipse.emf.ecore.EObject;
import org.eclipse.emf.ecore.EPackage;
import org.eclipse.emf.ecore.util.Switch;
/**
* <!-- 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 de.uni_mannheim.informatik.swt.models.plm.PLM.PLMPackage
* @generated
*/
public class PLMSwitch<T> extends Switch<T> {
/**
* The cached model package
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
protected static PLMPackage modelPackage;
/**
* Creates an instance of the switch.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public PLMSwitch() {
if (modelPackage == null) {
modelPackage = PLMPackage.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 PLMPackage.DOMAIN: {
Domain domain = (Domain)theEObject;
T result = caseDomain(domain);
if (result == null) result = defaultCase(theEObject);
return result;
}
case PLMPackage.ELEMENT: {
Element element = (Element)theEObject;
T result = caseElement(element);
if (result == null) result = defaultCase(theEObject);
return result;
}
case PLMPackage.DOMAIN_ELEMENT: {
DomainElement domainElement = (DomainElement)theEObject;
T result = caseDomainElement(domainElement);
if (result == null) result = caseOwnedElement(domainElement);
if (result == null) result = caseElement(domainElement);
if (result == null) result = defaultCase(theEObject);
return result;
}
case PLMPackage.MODEL: {
Model model = (Model)theEObject;
T result = caseModel(model);
if (result == null) result = caseElement(model);
if (result == null) result = caseContext(model);
if (result == null) result = defaultCase(theEObject);
return result;
}
case PLMPackage.ONTOLOGY: {
Ontology ontology = (Ontology)theEObject;
T result = caseOntology(ontology);
if (result == null) result = caseElement(ontology);
if (result == null) result = caseContext(ontology);
if (result == null) result = defaultCase(theEObject);
return result;
}
case PLMPackage.OWNED_ELEMENT: {
OwnedElement ownedElement = (OwnedElement)theEObject;
T result = caseOwnedElement(ownedElement);
if (result == null) result = caseElement(ownedElement);
if (result == null) result = defaultCase(theEObject);
return result;
}
case PLMPackage.CORRELATION: {
Correlation correlation = (Correlation)theEObject;
T result = caseCorrelation(correlation);
if (result == null) result = caseOwnedElement(correlation);
if (result == null) result = caseElement(correlation);
if (result == null) result = defaultCase(theEObject);
return result;
}
case PLMPackage.SET_RELATIONSHIP: {
SetRelationship setRelationship = (SetRelationship)theEObject;
T result = caseSetRelationship(setRelationship);
if (result == null) result = caseCorrelation(setRelationship);
if (result == null) result = caseOwnedElement(setRelationship);
if (result == null) result = caseElement(setRelationship);
if (result == null) result = defaultCase(theEObject);
return result;
}
case PLMPackage.EQUALITY: {
Equality equality = (Equality)theEObject;
T result = caseEquality(equality);
if (result == null) result = caseSetRelationship(equality);
if (result == null) result = caseCorrelation(equality);
if (result == null) result = caseOwnedElement(equality);
if (result == null) result = caseElement(equality);
if (result == null) result = defaultCase(theEObject);
return result;
}
case PLMPackage.INVERSION: {
Inversion inversion = (Inversion)theEObject;
T result = caseInversion(inversion);
if (result == null) result = caseSetRelationship(inversion);
if (result == null) result = caseCorrelation(inversion);
if (result == null) result = caseOwnedElement(inversion);
if (result == null) result = caseElement(inversion);
if (result == null) result = defaultCase(theEObject);
return result;
}
case PLMPackage.COMPLEMENT: {
Complement complement = (Complement)theEObject;
T result = caseComplement(complement);
if (result == null) result = caseSetRelationship(complement);
if (result == null) result = caseCorrelation(complement);
if (result == null) result = caseOwnedElement(complement);
if (result == null) result = caseElement(complement);
if (result == null) result = defaultCase(theEObject);
return result;
}
case PLMPackage.GENERALIZATION: {
Generalization generalization = (Generalization)theEObject;
T result = caseGeneralization(generalization);
if (result == null) result = caseCorrelation(generalization);
if (result == null) result = caseOwnedElement(generalization);
if (result == null) result = caseElement(generalization);
if (result == null) result = defaultCase(theEObject);
return result;
}
case PLMPackage.CLASSIFICATION: {
Classification classification = (Classification)theEObject;
T result = caseClassification(classification);
if (result == null) result = caseCorrelation(classification);
if (result == null) result = caseOwnedElement(classification);
if (result == null) result = caseElement(classification);
if (result == null) result = defaultCase(theEObject);
return result;
}
case PLMPackage.CLABJECT: {
Clabject clabject = (Clabject)theEObject;
T result = caseClabject(clabject);
if (result == null) result = caseDomainElement(clabject);
if (result == null) result = caseContext(clabject);
if (result == null) result = caseOwnedElement(clabject);
if (result == null) result = caseElement(clabject);
if (result == null) result = defaultCase(theEObject);
return result;
}
case PLMPackage.FEATURE: {
Feature feature = (Feature)theEObject;
T result = caseFeature(feature);
if (result == null) result = caseDomainElement(feature);
if (result == null) result = caseOwnedElement(feature);
if (result == null) result = caseElement(feature);
if (result == null) result = defaultCase(theEObject);
return result;
}
case PLMPackage.ENTITY: {
Entity entity = (Entity)theEObject;
T result = caseEntity(entity);
if (result == null) result = caseClabject(entity);
if (result == null) result = caseDomainElement(entity);
if (result == null) result = caseContext(entity);
if (result == null) result = caseOwnedElement(entity);
if (result == null) result = caseElement(entity);
if (result == null) result = defaultCase(theEObject);
return result;
}
case PLMPackage.CONNECTION: {
Connection connection = (Connection)theEObject;
T result = caseConnection(connection);
if (result == null) result = caseClabject(connection);
if (result == null) result = caseDomainElement(connection);
if (result == null) result = caseContext(connection);
if (result == null) result = caseOwnedElement(connection);
if (result == null) result = caseElement(connection);
if (result == null) result = defaultCase(theEObject);
return result;
}
case PLMPackage.PARTICIPATION: {
Participation participation = (Participation)theEObject;
T result = caseParticipation(participation);
if (result == null) result = defaultCase(theEObject);
return result;
}
case PLMPackage.LML_VISUALIZER: {
LMLVisualizer lmlVisualizer = (LMLVisualizer)theEObject;
T result = caseLMLVisualizer(lmlVisualizer);
if (result == null) result = defaultCase(theEObject);
return result;
}
case PLMPackage.ATTRIBUTE: {
Attribute attribute = (Attribute)theEObject;
T result = caseAttribute(attribute);
if (result == null) result = caseFeature(attribute);
if (result == null) result = caseDomainElement(attribute);
if (result == null) result = caseOwnedElement(attribute);
if (result == null) result = caseElement(attribute);
if (result == null) result = defaultCase(theEObject);
return result;
}
case PLMPackage.METHOD: {
Method method = (Method)theEObject;
T result = caseMethod(method);
if (result == null) result = caseFeature(method);
if (result == null) result = caseDomainElement(method);
if (result == null) result = caseOwnedElement(method);
if (result == null) result = caseElement(method);
if (result == null) result = defaultCase(theEObject);
return result;
}
case PLMPackage.ENUMERATION: {
Enumeration enumeration = (Enumeration)theEObject;
T result = caseEnumeration(enumeration);
if (result == null) result = caseElement(enumeration);
if (result == null) result = defaultCase(theEObject);
return result;
}
case PLMPackage.CONTEXT: {
Context context = (Context)theEObject;
T result = caseContext(context);
if (result == null) result = defaultCase(theEObject);
return result;
}
case PLMPackage.PARAMETER: {
Parameter parameter = (Parameter)theEObject;
T result = caseParameter(parameter);
if (result == null) result = defaultCase(theEObject);
return result;
}
case PLMPackage.ABSTRACT_DSL_VISUALIZER: {
AbstractDSLVisualizer abstractDSLVisualizer = (AbstractDSLVisualizer)theEObject;
T result = caseAbstractDSLVisualizer(abstractDSLVisualizer);
if (result == null) result = defaultCase(theEObject);
return result;
}
default: return defaultCase(theEObject);
}
}
/**
* Returns the result of interpreting the object as an instance of '<em>Domain</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>Domain</em>'.
* @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 '<em>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>Element</em>'.
* @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
* @generated
*/
public T caseElement(Element object) {
return null;
}
/**
* Returns the result of interpreting the object as an instance of '<em>Domain 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>Domain Element</em>'.
* @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
* @generated
*/
public T caseDomainElement(DomainElement object) {
return null;
}
/**
* Returns the result of interpreting the object as an instance of '<em>Model</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</em>'.
* @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
* @generated
*/
public T caseModel(Model object) {
return null;
}
/**
* Returns the result of interpreting the object as an instance of '<em>Ontology</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>Ontology</em>'.
* @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
* @generated
*/
public T caseOntology(Ontology object) {
return null;
}
/**
* Returns the result of interpreting the object as an instance of '<em>Owned 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>Owned Element</em>'.
* @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
* @generated
*/
public T caseOwnedElement(OwnedElement object) {
return null;
}
/**
* Returns the result of interpreting the object as an instance of '<em>Correlation</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>Correlation</em>'.
* @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
* @generated
*/
public T caseCorrelation(Correlation object) {
return null;
}
/**
* Returns the result of interpreting the object as an instance of '<em>Set Relationship</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>Set Relationship</em>'.
* @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
* @generated
*/
public T caseSetRelationship(SetRelationship object) {
return null;
}
/**
* Returns the result of interpreting the object as an instance of '<em>Equality</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>Equality</em>'.
* @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
* @generated
*/
public T caseEquality(Equality object) {
return null;
}
/**
* Returns the result of interpreting the object as an instance of '<em>Inversion</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>Inversion</em>'.
* @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
* @generated
*/
public T caseInversion(Inversion object) {
return null;
}
/**
* Returns the result of interpreting the object as an instance of '<em>Complement</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>Complement</em>'.
* @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
* @generated
*/
public T caseComplement(Complement object) {
return null;
}
/**
* Returns the result of interpreting the object as an instance of '<em>Generalization</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>Generalization</em>'.
* @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
* @generated
*/
public T caseGeneralization(Generalization object) {
return null;
}
/**
* Returns the result of interpreting the object as an instance of '<em>Classification</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>Classification</em>'.
* @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
* @generated
*/
public T caseClassification(Classification object) {
return null;
}
/**
* Returns the result of interpreting the object as an instance of '<em>Clabject</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>Clabject</em>'.
* @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
* @generated
*/
public T caseClabject(Clabject object) {
return null;
}
/**
* Returns the result of interpreting the object as an instance of '<em>Feature</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>Feature</em>'.
* @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 '<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>Connection</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>Connection</em>'.
* @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
* @generated
*/
public T caseConnection(Connection object) {
return null;
}
/**
* Returns the result of interpreting the object as an instance of '<em>Participation</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>Participation</em>'.
* @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
* @generated
*/
public T caseParticipation(Participation object) {
return null;
}
/**
* Returns the result of interpreting the object as an instance of '<em>LML Visualizer</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>LML Visualizer</em>'.
* @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
* @generated
*/
public T caseLMLVisualizer(LMLVisualizer object) {
return null;
}
/**
* Returns the result of interpreting the object as an instance of '<em>Attribute</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>Attribute</em>'.
* @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
* @generated
*/
public T caseAttribute(Attribute object) {
return null;
}
/**
* Returns the result of interpreting the object as an instance of '<em>Method</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>Method</em>'.
* @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
* @generated
*/
public T caseMethod(Method object) {
return null;
}
/**
* Returns the result of interpreting the object as an instance of '<em>Enumeration</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>Enumeration</em>'.
* @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
* @generated
*/
public T caseEnumeration(Enumeration object) {
return null;
}
/**
* Returns the result of interpreting the object as an instance of '<em>Context</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>Context</em>'.
* @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
* @generated
*/
public T caseContext(Context object) {
return null;
}
/**
* Returns the result of interpreting the object as an instance of '<em>Parameter</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>Parameter</em>'.
* @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
* @generated
*/
public T caseParameter(Parameter object) {
return null;
}
/**
* Returns the result of interpreting the object as an instance of '<em>Abstract DSL Visualizer</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>Abstract DSL Visualizer</em>'.
* @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
* @generated
*/
public T caseAbstractDSLVisualizer(AbstractDSLVisualizer 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;
}
} //PLMSwitch