/**
*/
package org.eclipse.viatra.solver.language.model.problem.util;
import org.eclipse.emf.ecore.EObject;
import org.eclipse.emf.ecore.EPackage;
import org.eclipse.emf.ecore.util.Switch;
import org.eclipse.viatra.solver.language.model.problem.*;
/**
*
* 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.eclipse.viatra.solver.language.model.problem.ProblemPackage
* @generated
*/
public class ProblemSwitch extends Switch {
/**
* The cached model package
*
*
* @generated
*/
protected static ProblemPackage modelPackage;
/**
* Creates an instance of the switch.
*
*
* @generated
*/
public ProblemSwitch() {
if (modelPackage == null) {
modelPackage = ProblemPackage.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 ProblemPackage.PROBLEM: {
Problem problem = (Problem) theEObject;
T result = caseProblem(problem);
if (result == null)
result = caseNamedElement(problem);
if (result == null)
result = defaultCase(theEObject);
return result;
}
case ProblemPackage.RELATION: {
Relation relation = (Relation) theEObject;
T result = caseRelation(relation);
if (result == null)
result = caseNamedElement(relation);
if (result == null)
result = defaultCase(theEObject);
return result;
}
case ProblemPackage.CLASS_DECLARATION: {
ClassDeclaration classDeclaration = (ClassDeclaration) theEObject;
T result = caseClassDeclaration(classDeclaration);
if (result == null)
result = caseRelation(classDeclaration);
if (result == null)
result = caseStatement(classDeclaration);
if (result == null)
result = caseNamedElement(classDeclaration);
if (result == null)
result = defaultCase(theEObject);
return result;
}
case ProblemPackage.REFERENCE_DECLARATION: {
ReferenceDeclaration referenceDeclaration = (ReferenceDeclaration) theEObject;
T result = caseReferenceDeclaration(referenceDeclaration);
if (result == null)
result = caseRelation(referenceDeclaration);
if (result == null)
result = caseNamedElement(referenceDeclaration);
if (result == null)
result = defaultCase(theEObject);
return result;
}
case ProblemPackage.NAMED_ELEMENT: {
NamedElement namedElement = (NamedElement) theEObject;
T result = caseNamedElement(namedElement);
if (result == null)
result = defaultCase(theEObject);
return result;
}
case ProblemPackage.PREDICATE_DEFINITION: {
PredicateDefinition predicateDefinition = (PredicateDefinition) theEObject;
T result = casePredicateDefinition(predicateDefinition);
if (result == null)
result = caseRelation(predicateDefinition);
if (result == null)
result = caseStatement(predicateDefinition);
if (result == null)
result = caseNamedElement(predicateDefinition);
if (result == null)
result = defaultCase(theEObject);
return result;
}
case ProblemPackage.PARAMETER: {
Parameter parameter = (Parameter) theEObject;
T result = caseParameter(parameter);
if (result == null)
result = caseVariable(parameter);
if (result == null)
result = caseNamedElement(parameter);
if (result == null)
result = defaultCase(theEObject);
return result;
}
case ProblemPackage.VARIABLE: {
Variable variable = (Variable) theEObject;
T result = caseVariable(variable);
if (result == null)
result = caseNamedElement(variable);
if (result == null)
result = defaultCase(theEObject);
return result;
}
case ProblemPackage.CONJUNCTION: {
Conjunction conjunction = (Conjunction) theEObject;
T result = caseConjunction(conjunction);
if (result == null)
result = caseExistentialQuantifier(conjunction);
if (result == null)
result = defaultCase(theEObject);
return result;
}
case ProblemPackage.LITERAL: {
Literal literal = (Literal) theEObject;
T result = caseLiteral(literal);
if (result == null)
result = defaultCase(theEObject);
return result;
}
case ProblemPackage.ATOM: {
Atom atom = (Atom) theEObject;
T result = caseAtom(atom);
if (result == null)
result = caseLiteral(atom);
if (result == null)
result = defaultCase(theEObject);
return result;
}
case ProblemPackage.IMPLICIT_VARIABLE: {
ImplicitVariable implicitVariable = (ImplicitVariable) theEObject;
T result = caseImplicitVariable(implicitVariable);
if (result == null)
result = caseVariable(implicitVariable);
if (result == null)
result = caseNamedElement(implicitVariable);
if (result == null)
result = defaultCase(theEObject);
return result;
}
case ProblemPackage.NEGATIVE_LITERAL: {
NegativeLiteral negativeLiteral = (NegativeLiteral) theEObject;
T result = caseNegativeLiteral(negativeLiteral);
if (result == null)
result = caseExistentialQuantifier(negativeLiteral);
if (result == null)
result = caseLiteral(negativeLiteral);
if (result == null)
result = defaultCase(theEObject);
return result;
}
case ProblemPackage.EXISTENTIAL_QUANTIFIER: {
ExistentialQuantifier existentialQuantifier = (ExistentialQuantifier) theEObject;
T result = caseExistentialQuantifier(existentialQuantifier);
if (result == null)
result = defaultCase(theEObject);
return result;
}
case ProblemPackage.ASSERTION: {
Assertion assertion = (Assertion) theEObject;
T result = caseAssertion(assertion);
if (result == null)
result = caseStatement(assertion);
if (result == null)
result = defaultCase(theEObject);
return result;
}
case ProblemPackage.NODE: {
Node node = (Node) theEObject;
T result = caseNode(node);
if (result == null)
result = caseNamedElement(node);
if (result == null)
result = defaultCase(theEObject);
return result;
}
case ProblemPackage.SCOPE_DECLARATION: {
ScopeDeclaration scopeDeclaration = (ScopeDeclaration) theEObject;
T result = caseScopeDeclaration(scopeDeclaration);
if (result == null)
result = caseStatement(scopeDeclaration);
if (result == null)
result = defaultCase(theEObject);
return result;
}
case ProblemPackage.STATEMENT: {
Statement statement = (Statement) theEObject;
T result = caseStatement(statement);
if (result == null)
result = defaultCase(theEObject);
return result;
}
case ProblemPackage.TYPE_SCOPE: {
TypeScope typeScope = (TypeScope) theEObject;
T result = caseTypeScope(typeScope);
if (result == null)
result = defaultCase(theEObject);
return result;
}
case ProblemPackage.MULTIPLICITY: {
Multiplicity multiplicity = (Multiplicity) theEObject;
T result = caseMultiplicity(multiplicity);
if (result == null)
result = defaultCase(theEObject);
return result;
}
case ProblemPackage.RANGE_MULTIPLICITY: {
RangeMultiplicity rangeMultiplicity = (RangeMultiplicity) theEObject;
T result = caseRangeMultiplicity(rangeMultiplicity);
if (result == null)
result = caseMultiplicity(rangeMultiplicity);
if (result == null)
result = defaultCase(theEObject);
return result;
}
case ProblemPackage.EXACT_MULTIPLICITY: {
ExactMultiplicity exactMultiplicity = (ExactMultiplicity) theEObject;
T result = caseExactMultiplicity(exactMultiplicity);
if (result == null)
result = caseMultiplicity(exactMultiplicity);
if (result == null)
result = defaultCase(theEObject);
return result;
}
case ProblemPackage.UNBOUNDED_MULTIPLICITY: {
UnboundedMultiplicity unboundedMultiplicity = (UnboundedMultiplicity) theEObject;
T result = caseUnboundedMultiplicity(unboundedMultiplicity);
if (result == null)
result = caseMultiplicity(unboundedMultiplicity);
if (result == null)
result = defaultCase(theEObject);
return result;
}
case ProblemPackage.ARGUMENT: {
Argument argument = (Argument) theEObject;
T result = caseArgument(argument);
if (result == null)
result = defaultCase(theEObject);
return result;
}
default:
return defaultCase(theEObject);
}
}
/**
* Returns the result of interpreting the object as an instance of 'Problem'.
*
* 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 'Problem'.
* @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
* @generated
*/
public T caseProblem(Problem object) {
return null;
}
/**
* Returns the result of interpreting the object as an instance of 'Relation'.
*
* 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 'Relation'.
* @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
* @generated
*/
public T caseRelation(Relation object) {
return null;
}
/**
* Returns the result of interpreting the object as an instance of 'Class Declaration'.
*
* 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 'Class Declaration'.
* @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
* @generated
*/
public T caseClassDeclaration(ClassDeclaration object) {
return null;
}
/**
* Returns the result of interpreting the object as an instance of 'Reference Declaration'.
*
* 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 'Reference Declaration'.
* @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
* @generated
*/
public T caseReferenceDeclaration(ReferenceDeclaration object) {
return null;
}
/**
* Returns the result of interpreting the object as an instance of 'Named Element'.
*
* 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 'Named Element'.
* @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
* @generated
*/
public T caseNamedElement(NamedElement object) {
return null;
}
/**
* Returns the result of interpreting the object as an instance of 'Predicate Definition'.
*
* 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 'Predicate Definition'.
* @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
* @generated
*/
public T casePredicateDefinition(PredicateDefinition object) {
return null;
}
/**
* Returns the result of interpreting the object as an instance of 'Parameter'.
*
* 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 'Parameter'.
* @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 'Variable'.
*
* 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 'Variable'.
* @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
* @generated
*/
public T caseVariable(Variable object) {
return null;
}
/**
* Returns the result of interpreting the object as an instance of 'Conjunction'.
*
* 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 'Conjunction'.
* @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
* @generated
*/
public T caseConjunction(Conjunction object) {
return null;
}
/**
* Returns the result of interpreting the object as an instance of 'Literal'.
*
* 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 'Literal'.
* @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
* @generated
*/
public T caseLiteral(Literal object) {
return null;
}
/**
* Returns the result of interpreting the object as an instance of 'Atom'.
*
* 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 'Atom'.
* @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
* @generated
*/
public T caseAtom(Atom object) {
return null;
}
/**
* Returns the result of interpreting the object as an instance of 'Implicit Variable'.
*
* 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 'Implicit Variable'.
* @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
* @generated
*/
public T caseImplicitVariable(ImplicitVariable object) {
return null;
}
/**
* Returns the result of interpreting the object as an instance of 'Negative Literal'.
*
* 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 'Negative Literal'.
* @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
* @generated
*/
public T caseNegativeLiteral(NegativeLiteral object) {
return null;
}
/**
* Returns the result of interpreting the object as an instance of 'Existential Quantifier'.
*
* 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 'Existential Quantifier'.
* @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
* @generated
*/
public T caseExistentialQuantifier(ExistentialQuantifier object) {
return null;
}
/**
* Returns the result of interpreting the object as an instance of 'Assertion'.
*
* 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 'Assertion'.
* @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
* @generated
*/
public T caseAssertion(Assertion object) {
return null;
}
/**
* Returns the result of interpreting the object as an instance of 'Node'.
*
* 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 'Node'.
* @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
* @generated
*/
public T caseNode(Node object) {
return null;
}
/**
* Returns the result of interpreting the object as an instance of 'Scope Declaration'.
*
* 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 'Scope Declaration'.
* @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
* @generated
*/
public T caseScopeDeclaration(ScopeDeclaration object) {
return null;
}
/**
* Returns the result of interpreting the object as an instance of 'Statement'.
*
* 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 'Statement'.
* @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
* @generated
*/
public T caseStatement(Statement object) {
return null;
}
/**
* Returns the result of interpreting the object as an instance of 'Type Scope'.
*
* 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 'Type Scope'.
* @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
* @generated
*/
public T caseTypeScope(TypeScope object) {
return null;
}
/**
* Returns the result of interpreting the object as an instance of 'Multiplicity'.
*
* 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 'Multiplicity'.
* @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
* @generated
*/
public T caseMultiplicity(Multiplicity object) {
return null;
}
/**
* Returns the result of interpreting the object as an instance of 'Range Multiplicity'.
*
* 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 'Range Multiplicity'.
* @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
* @generated
*/
public T caseRangeMultiplicity(RangeMultiplicity object) {
return null;
}
/**
* Returns the result of interpreting the object as an instance of 'Exact Multiplicity'.
*
* 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 'Exact Multiplicity'.
* @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
* @generated
*/
public T caseExactMultiplicity(ExactMultiplicity object) {
return null;
}
/**
* Returns the result of interpreting the object as an instance of 'Unbounded Multiplicity'.
*
* 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 'Unbounded Multiplicity'.
* @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
* @generated
*/
public T caseUnboundedMultiplicity(UnboundedMultiplicity object) {
return null;
}
/**
* Returns the result of interpreting the object as an instance of 'Argument'.
*
* 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 'Argument'.
* @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
* @generated
*/
public T caseArgument(Argument 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;
}
} //ProblemSwitch