/**
*/
package core.util;
import core.*;
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 core.CorePackage
* @generated
*/
public class CoreSwitch<T> extends Switch<T> {
/**
* The cached model package
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
protected static CorePackage modelPackage;
/**
* Creates an instance of the switch.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public CoreSwitch() {
if (modelPackage == null) {
modelPackage = CorePackage.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 CorePackage.RULE: {
Rule rule = (Rule)theEObject;
T result = caseRule(rule);
if (result == null) result = defaultCase(theEObject);
return result;
}
case CorePackage.ADD: {
Add add = (Add)theEObject;
T result = caseAdd(add);
if (result == null) result = caseBinaryExpression(add);
if (result == null) result = caseIntegerExpression(add);
if (result == null) result = defaultCase(theEObject);
return result;
}
case CorePackage.INTEGER_EXPRESSION: {
IntegerExpression integerExpression = (IntegerExpression)theEObject;
T result = caseIntegerExpression(integerExpression);
if (result == null) result = defaultCase(theEObject);
return result;
}
case CorePackage.UNARY_EXPRESSION: {
UnaryExpression unaryExpression = (UnaryExpression)theEObject;
T result = caseUnaryExpression(unaryExpression);
if (result == null) result = caseIntegerExpression(unaryExpression);
if (result == null) result = defaultCase(theEObject);
return result;
}
case CorePackage.AND: {
And and = (And)theEObject;
T result = caseAnd(and);
if (result == null) result = caseBinaryExpression(and);
if (result == null) result = caseIntegerExpression(and);
if (result == null) result = defaultCase(theEObject);
return result;
}
case CorePackage.OR: {
Or or = (Or)theEObject;
T result = caseOr(or);
if (result == null) result = caseBinaryExpression(or);
if (result == null) result = caseIntegerExpression(or);
if (result == null) result = defaultCase(theEObject);
return result;
}
case CorePackage.NOT: {
Not not = (Not)theEObject;
T result = caseNot(not);
if (result == null) result = caseUnaryExpression(not);
if (result == null) result = caseIntegerExpression(not);
if (result == null) result = defaultCase(theEObject);
return result;
}
case CorePackage.GREATER: {
Greater greater = (Greater)theEObject;
T result = caseGreater(greater);
if (result == null) result = caseBinaryExpression(greater);
if (result == null) result = caseIntegerExpression(greater);
if (result == null) result = defaultCase(theEObject);
return result;
}
case CorePackage.LOWER: {
Lower lower = (Lower)theEObject;
T result = caseLower(lower);
if (result == null) result = caseBinaryExpression(lower);
if (result == null) result = caseIntegerExpression(lower);
if (result == null) result = defaultCase(theEObject);
return result;
}
case CorePackage.INTEGER_LITERAL: {
IntegerLiteral integerLiteral = (IntegerLiteral)theEObject;
T result = caseIntegerLiteral(integerLiteral);
if (result == null) result = caseIntegerExpression(integerLiteral);
if (result == null) result = defaultCase(theEObject);
return result;
}
case CorePackage.CONDITIONAL: {
Conditional conditional = (Conditional)theEObject;
T result = caseConditional(conditional);
if (result == null) result = caseIntegerExpression(conditional);
if (result == null) result = defaultCase(theEObject);
return result;
}
case CorePackage.BINARY_EXPRESSION: {
BinaryExpression binaryExpression = (BinaryExpression)theEObject;
T result = caseBinaryExpression(binaryExpression);
if (result == null) result = caseIntegerExpression(binaryExpression);
if (result == null) result = defaultCase(theEObject);
return result;
}
case CorePackage.MULT: {
Mult mult = (Mult)theEObject;
T result = caseMult(mult);
if (result == null) result = caseBinaryExpression(mult);
if (result == null) result = caseIntegerExpression(mult);
if (result == null) result = defaultCase(theEObject);
return result;
}
case CorePackage.DIV: {
Div div = (Div)theEObject;
T result = caseDiv(div);
if (result == null) result = caseBinaryExpression(div);
if (result == null) result = caseIntegerExpression(div);
if (result == null) result = defaultCase(theEObject);
return result;
}
case CorePackage.FILTER: {
Filter filter = (Filter)theEObject;
T result = caseFilter(filter);
if (result == null) result = defaultCase(theEObject);
return result;
}
case CorePackage.MOD: {
Mod mod = (Mod)theEObject;
T result = caseMod(mod);
if (result == null) result = caseBinaryExpression(mod);
if (result == null) result = caseIntegerExpression(mod);
if (result == null) result = defaultCase(theEObject);
return result;
}
case CorePackage.UMINUS: {
UMinus uMinus = (UMinus)theEObject;
T result = caseUMinus(uMinus);
if (result == null) result = caseUnaryExpression(uMinus);
if (result == null) result = caseIntegerExpression(uMinus);
if (result == null) result = defaultCase(theEObject);
return result;
}
case CorePackage.MINUS: {
Minus minus = (Minus)theEObject;
T result = caseMinus(minus);
if (result == null) result = caseBinaryExpression(minus);
if (result == null) result = caseIntegerExpression(minus);
if (result == null) result = defaultCase(theEObject);
return result;
}
case CorePackage.EQUAL: {
Equal equal = (Equal)theEObject;
T result = caseEqual(equal);
if (result == null) result = caseBinaryExpression(equal);
if (result == null) result = caseIntegerExpression(equal);
if (result == null) result = defaultCase(theEObject);
return result;
}
default: return defaultCase(theEObject);
}
}
/**
* Returns the result of interpreting the object as an instance of '<em>Rule</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>Rule</em>'.
* @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
* @generated
*/
public T caseRule(Rule object) {
return null;
}
/**
* Returns the result of interpreting the object as an instance of '<em>Add</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>Add</em>'.
* @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
* @generated
*/
public T caseAdd(Add object) {
return null;
}
/**
* Returns the result of interpreting the object as an instance of '<em>Integer 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>Integer Expression</em>'.
* @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
* @generated
*/
public T caseIntegerExpression(IntegerExpression object) {
return null;
}
/**
* Returns the result of interpreting the object as an instance of '<em>Unary 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>Unary Expression</em>'.
* @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
* @generated
*/
public T caseUnaryExpression(UnaryExpression 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>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>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>Greater</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>Greater</em>'.
* @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
* @generated
*/
public T caseGreater(Greater object) {
return null;
}
/**
* Returns the result of interpreting the object as an instance of '<em>Lower</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>Lower</em>'.
* @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
* @generated
*/
public T caseLower(Lower object) {
return null;
}
/**
* Returns the result of interpreting the object as an instance of '<em>Integer Literal</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>Integer Literal</em>'.
* @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
* @generated
*/
public T caseIntegerLiteral(IntegerLiteral object) {
return null;
}
/**
* Returns the result of interpreting the object as an instance of '<em>Conditional</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>Conditional</em>'.
* @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
* @generated
*/
public T caseConditional(Conditional object) {
return null;
}
/**
* Returns the result of interpreting the object as an instance of '<em>Binary 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>Binary Expression</em>'.
* @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
* @generated
*/
public T caseBinaryExpression(BinaryExpression object) {
return null;
}
/**
* Returns the result of interpreting the object as an instance of '<em>Mult</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>Mult</em>'.
* @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
* @generated
*/
public T caseMult(Mult object) {
return null;
}
/**
* Returns the result of interpreting the object as an instance of '<em>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>Div</em>'.
* @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
* @generated
*/
public T caseDiv(Div object) {
return null;
}
/**
* Returns the result of interpreting the object as an instance of '<em>Filter</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>Filter</em>'.
* @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
* @generated
*/
public T caseFilter(Filter object) {
return null;
}
/**
* Returns the result of interpreting the object as an instance of '<em>Mod</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>Mod</em>'.
* @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
* @generated
*/
public T caseMod(Mod object) {
return null;
}
/**
* Returns the result of interpreting the object as an instance of '<em>UMinus</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>UMinus</em>'.
* @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
* @generated
*/
public T caseUMinus(UMinus 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>Equal</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>Equal</em>'.
* @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
* @generated
*/
public T caseEqual(Equal 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;
}
} //CoreSwitch