/**
*/
package org.example.expressions.expressions.util;
import org.eclipse.emf.ecore.EObject;
import org.eclipse.emf.ecore.EPackage;
import org.eclipse.emf.ecore.util.Switch;
import org.example.expressions.expressions.*;
/**
* <!-- 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.example.expressions.expressions.ExpressionsPackage
* @generated
*/
public class ExpressionsSwitch<T> extends Switch<T>
{
/**
* The cached model package
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
protected static ExpressionsPackage modelPackage;
/**
* Creates an instance of the switch.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public ExpressionsSwitch()
{
if (modelPackage == null)
{
modelPackage = ExpressionsPackage.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 ExpressionsPackage.EXPRESSIONS_MODEL:
{
ExpressionsModel expressionsModel = (ExpressionsModel)theEObject;
T result = caseExpressionsModel(expressionsModel);
if (result == null) result = defaultCase(theEObject);
return result;
}
case ExpressionsPackage.ABSTRACT_ELEMENT:
{
AbstractElement abstractElement = (AbstractElement)theEObject;
T result = caseAbstractElement(abstractElement);
if (result == null) result = defaultCase(theEObject);
return result;
}
case ExpressionsPackage.VARIABLE:
{
Variable variable = (Variable)theEObject;
T result = caseVariable(variable);
if (result == null) result = caseAbstractElement(variable);
if (result == null) result = defaultCase(theEObject);
return result;
}
case ExpressionsPackage.EXPRESSION:
{
Expression expression = (Expression)theEObject;
T result = caseExpression(expression);
if (result == null) result = caseAbstractElement(expression);
if (result == null) result = defaultCase(theEObject);
return result;
}
case ExpressionsPackage.OR:
{
Or or = (Or)theEObject;
T result = caseOr(or);
if (result == null) result = caseExpression(or);
if (result == null) result = caseAbstractElement(or);
if (result == null) result = defaultCase(theEObject);
return result;
}
case ExpressionsPackage.AND:
{
And and = (And)theEObject;
T result = caseAnd(and);
if (result == null) result = caseExpression(and);
if (result == null) result = caseAbstractElement(and);
if (result == null) result = defaultCase(theEObject);
return result;
}
case ExpressionsPackage.EQUALITY:
{
Equality equality = (Equality)theEObject;
T result = caseEquality(equality);
if (result == null) result = caseExpression(equality);
if (result == null) result = caseAbstractElement(equality);
if (result == null) result = defaultCase(theEObject);
return result;
}
case ExpressionsPackage.COMPARISON:
{
Comparison comparison = (Comparison)theEObject;
T result = caseComparison(comparison);
if (result == null) result = caseExpression(comparison);
if (result == null) result = caseAbstractElement(comparison);
if (result == null) result = defaultCase(theEObject);
return result;
}
case ExpressionsPackage.PLUS:
{
Plus plus = (Plus)theEObject;
T result = casePlus(plus);
if (result == null) result = caseExpression(plus);
if (result == null) result = caseAbstractElement(plus);
if (result == null) result = defaultCase(theEObject);
return result;
}
case ExpressionsPackage.MINUS:
{
Minus minus = (Minus)theEObject;
T result = caseMinus(minus);
if (result == null) result = caseExpression(minus);
if (result == null) result = caseAbstractElement(minus);
if (result == null) result = defaultCase(theEObject);
return result;
}
case ExpressionsPackage.MUL_OR_DIV:
{
MulOrDiv mulOrDiv = (MulOrDiv)theEObject;
T result = caseMulOrDiv(mulOrDiv);
if (result == null) result = caseExpression(mulOrDiv);
if (result == null) result = caseAbstractElement(mulOrDiv);
if (result == null) result = defaultCase(theEObject);
return result;
}
case ExpressionsPackage.NOT:
{
Not not = (Not)theEObject;
T result = caseNot(not);
if (result == null) result = caseExpression(not);
if (result == null) result = caseAbstractElement(not);
if (result == null) result = defaultCase(theEObject);
return result;
}
case ExpressionsPackage.INT_CONSTANT:
{
IntConstant intConstant = (IntConstant)theEObject;
T result = caseIntConstant(intConstant);
if (result == null) result = caseExpression(intConstant);
if (result == null) result = caseAbstractElement(intConstant);
if (result == null) result = defaultCase(theEObject);
return result;
}
case ExpressionsPackage.STRING_CONSTANT:
{
StringConstant stringConstant = (StringConstant)theEObject;
T result = caseStringConstant(stringConstant);
if (result == null) result = caseExpression(stringConstant);
if (result == null) result = caseAbstractElement(stringConstant);
if (result == null) result = defaultCase(theEObject);
return result;
}
case ExpressionsPackage.BOOL_CONSTANT:
{
BoolConstant boolConstant = (BoolConstant)theEObject;
T result = caseBoolConstant(boolConstant);
if (result == null) result = caseExpression(boolConstant);
if (result == null) result = caseAbstractElement(boolConstant);
if (result == null) result = defaultCase(theEObject);
return result;
}
case ExpressionsPackage.VARIABLE_REF:
{
VariableRef variableRef = (VariableRef)theEObject;
T result = caseVariableRef(variableRef);
if (result == null) result = caseExpression(variableRef);
if (result == null) result = caseAbstractElement(variableRef);
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 caseExpressionsModel(ExpressionsModel object)
{
return null;
}
/**
* Returns the result of interpreting the object as an instance of '<em>Abstract 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>Abstract Element</em>'.
* @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
* @generated
*/
public T caseAbstractElement(AbstractElement object)
{
return null;
}
/**
* Returns the result of interpreting the object as an instance of '<em>Variable</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>Variable</em>'.
* @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 '<em>Expression</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>Expression</em>'.
* @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
* @generated
*/
public T caseExpression(Expression object)
{
return null;
}
/**
* Returns the result of interpreting the object as an instance of '<em>Or</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>Or</em>'.
* @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
* @generated
*/
public T caseOr(Or object)
{
return null;
}
/**
* Returns the result of interpreting the object as an instance of '<em>And</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>And</em>'.
* @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
* @generated
*/
public T caseAnd(And 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>Comparison</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>Comparison</em>'.
* @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
* @generated
*/
public T caseComparison(Comparison object)
{
return null;
}
/**
* Returns the result of interpreting the object as an instance of '<em>Plus</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>Plus</em>'.
* @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
* @generated
*/
public T casePlus(Plus object)
{
return null;
}
/**
* Returns the result of interpreting the object as an instance of '<em>Minus</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>Minus</em>'.
* @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
* @generated
*/
public T caseMinus(Minus object)
{
return null;
}
/**
* Returns the result of interpreting the object as an instance of '<em>Mul Or Div</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>Mul Or Div</em>'.
* @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
* @generated
*/
public T caseMulOrDiv(MulOrDiv object)
{
return null;
}
/**
* Returns the result of interpreting the object as an instance of '<em>Not</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>Not</em>'.
* @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
* @generated
*/
public T caseNot(Not object)
{
return null;
}
/**
* Returns the result of interpreting the object as an instance of '<em>Int Constant</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>Int Constant</em>'.
* @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
* @generated
*/
public T caseIntConstant(IntConstant object)
{
return null;
}
/**
* Returns the result of interpreting the object as an instance of '<em>String Constant</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>String Constant</em>'.
* @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
* @generated
*/
public T caseStringConstant(StringConstant object)
{
return null;
}
/**
* Returns the result of interpreting the object as an instance of '<em>Bool Constant</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>Bool Constant</em>'.
* @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
* @generated
*/
public T caseBoolConstant(BoolConstant object)
{
return null;
}
/**
* Returns the result of interpreting the object as an instance of '<em>Variable Ref</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>Variable Ref</em>'.
* @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
* @generated
*/
public T caseVariableRef(VariableRef 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;
}
} //ExpressionsSwitch