blob: 09d25b94d43156d0686f0e24bee2909f3a9ae651 [file] [log] [blame]
/*******************************************************************************
* Copyright (c) 2016 Fundación Tecnalia Research & Innovation.
*
* 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:
* Huascar Espinoza - initial API and implementation
* Alejandra Ruíz - initial API and implementation
* Idoya Del Río - initial API and implementation
* Mari Carmen Palacios - initial API and implementation
* Angel López - initial API and implementation
*******************************************************************************/
/**
*/
package org.eclipse.opencert.sam.agree.agreement.util;
import org.eclipse.emf.ecore.EObject;
import org.eclipse.emf.ecore.EPackage;
import org.eclipse.emf.ecore.util.Switch;
import org.eclipse.opencert.sam.agree.agreement.*;
/**
* <!-- 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.opencert.sam.agree.agreement.AgreementPackage
* @generated
*/
public class AgreementSwitch<T> extends Switch<T>
{
/**
* The cached model package
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
protected static AgreementPackage modelPackage;
/**
* Creates an instance of the switch.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public AgreementSwitch()
{
if (modelPackage == null)
{
modelPackage = AgreementPackage.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 AgreementPackage.MODEL:
{
Model model = (Model)theEObject;
T result = caseModel(model);
if (result == null) result = defaultCase(theEObject);
return result;
}
case AgreementPackage.CONTRACT:
{
Contract contract = (Contract)theEObject;
T result = caseContract(contract);
if (result == null) result = defaultCase(theEObject);
return result;
}
case AgreementPackage.ASSERTION_DEFINITION:
{
assertionDefinition assertionDefinition = (assertionDefinition)theEObject;
T result = caseassertionDefinition(assertionDefinition);
if (result == null) result = defaultCase(theEObject);
return result;
}
case AgreementPackage.STRATEGY_DEFINITION:
{
strategyDefinition strategyDefinition = (strategyDefinition)theEObject;
T result = casestrategyDefinition(strategyDefinition);
if (result == null) result = defaultCase(theEObject);
return result;
}
case AgreementPackage.VIEWPOINT_ID:
{
viewpointId viewpointId = (viewpointId)theEObject;
T result = caseviewpointId(viewpointId);
if (result == null) result = defaultCase(theEObject);
return result;
}
case AgreementPackage.ASSERTIONPATTERN:
{
assertionpattern assertionpattern = (assertionpattern)theEObject;
T result = caseassertionpattern(assertionpattern);
if (result == null) result = defaultCase(theEObject);
return result;
}
case AgreementPackage.NOUN:
{
Noun noun = (Noun)theEObject;
T result = caseNoun(noun);
if (result == null) result = defaultCase(theEObject);
return result;
}
case AgreementPackage.VERB:
{
Verb verb = (Verb)theEObject;
T result = caseVerb(verb);
if (result == null) result = defaultCase(theEObject);
return result;
}
case AgreementPackage.SIMPLE:
{
simple simple = (simple)theEObject;
T result = casesimple(simple);
if (result == null) result = defaultCase(theEObject);
return result;
}
case AgreementPackage.FACT:
{
Fact fact = (Fact)theEObject;
T result = caseFact(fact);
if (result == null) result = defaultCase(theEObject);
return result;
}
case AgreementPackage.PATTERN:
{
Pattern pattern = (Pattern)theEObject;
T result = casePattern(pattern);
if (result == null) result = defaultCase(theEObject);
return result;
}
case AgreementPackage.NONFUNCTIONAL:
{
nonfunctional nonfunctional = (nonfunctional)theEObject;
T result = casenonfunctional(nonfunctional);
if (result == null) result = defaultCase(theEObject);
return result;
}
case AgreementPackage.MEMORY:
{
memory memory = (memory)theEObject;
T result = casememory(memory);
if (result == null) result = defaultCase(theEObject);
return result;
}
case AgreementPackage.TIMMING:
{
timming timming = (timming)theEObject;
T result = casetimming(timming);
if (result == null) result = casenonfunctional(timming);
if (result == null) result = defaultCase(theEObject);
return result;
}
case AgreementPackage.BEHAVE:
{
behave behave = (behave)theEObject;
T result = casebehave(behave);
if (result == null) result = casePattern(behave);
if (result == null) result = defaultCase(theEObject);
return result;
}
default: return defaultCase(theEObject);
}
}
/**
* 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>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>Contract</em>'.
* @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
* @generated
*/
public T caseContract(Contract object)
{
return null;
}
/**
* Returns the result of interpreting the object as an instance of '<em>assertion Definition</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>assertion Definition</em>'.
* @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
* @generated
*/
public T caseassertionDefinition(assertionDefinition object)
{
return null;
}
/**
* Returns the result of interpreting the object as an instance of '<em>strategy Definition</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>strategy Definition</em>'.
* @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
* @generated
*/
public T casestrategyDefinition(strategyDefinition object)
{
return null;
}
/**
* Returns the result of interpreting the object as an instance of '<em>viewpoint Id</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>viewpoint Id</em>'.
* @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
* @generated
*/
public T caseviewpointId(viewpointId object)
{
return null;
}
/**
* Returns the result of interpreting the object as an instance of '<em>assertionpattern</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>assertionpattern</em>'.
* @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
* @generated
*/
public T caseassertionpattern(assertionpattern object)
{
return null;
}
/**
* Returns the result of interpreting the object as an instance of '<em>Noun</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>Noun</em>'.
* @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
* @generated
*/
public T caseNoun(Noun object)
{
return null;
}
/**
* Returns the result of interpreting the object as an instance of '<em>Verb</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>Verb</em>'.
* @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
* @generated
*/
public T caseVerb(Verb object)
{
return null;
}
/**
* Returns the result of interpreting the object as an instance of '<em>simple</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>simple</em>'.
* @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
* @generated
*/
public T casesimple(simple object)
{
return null;
}
/**
* Returns the result of interpreting the object as an instance of '<em>Fact</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>Fact</em>'.
* @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
* @generated
*/
public T caseFact(Fact object)
{
return null;
}
/**
* Returns the result of interpreting the object as an instance of '<em>Pattern</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>Pattern</em>'.
* @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
* @generated
*/
public T casePattern(Pattern object)
{
return null;
}
/**
* Returns the result of interpreting the object as an instance of '<em>nonfunctional</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>nonfunctional</em>'.
* @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
* @generated
*/
public T casenonfunctional(nonfunctional object)
{
return null;
}
/**
* Returns the result of interpreting the object as an instance of '<em>memory</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>memory</em>'.
* @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
* @generated
*/
public T casememory(memory object)
{
return null;
}
/**
* Returns the result of interpreting the object as an instance of '<em>timming</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>timming</em>'.
* @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
* @generated
*/
public T casetimming(timming object)
{
return null;
}
/**
* Returns the result of interpreting the object as an instance of '<em>behave</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>behave</em>'.
* @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
* @generated
*/
public T casebehave(behave 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;
}
} //AgreementSwitch