/**
*/
package de.sebastianbenz.task.query.util;
import de.sebastianbenz.task.query.*;
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.sebastianbenz.task.query.QueryPackage
* @generated
*/
public class QuerySwitch<T> extends Switch<T>
{
/**
* The cached model package
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
protected static QueryPackage modelPackage;
/**
* Creates an instance of the switch.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public QuerySwitch()
{
if (modelPackage == null)
{
modelPackage = QueryPackage.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 QueryPackage.QUERY:
{
Query query = (Query)theEObject;
T result = caseQuery(query);
if (result == null) result = defaultCase(theEObject);
return result;
}
case QueryPackage.EXPRESSION:
{
Expression expression = (Expression)theEObject;
T result = caseExpression(expression);
if (result == null) result = defaultCase(theEObject);
return result;
}
case QueryPackage.ATOM:
{
Atom atom = (Atom)theEObject;
T result = caseAtom(atom);
if (result == null) result = caseExpression(atom);
if (result == null) result = defaultCase(theEObject);
return result;
}
case QueryPackage.VALUE:
{
Value value = (Value)theEObject;
T result = caseValue(value);
if (result == null) result = caseAtom(value);
if (result == null) result = caseExpression(value);
if (result == null) result = defaultCase(theEObject);
return result;
}
case QueryPackage.PAREN_EXPR:
{
ParenExpr parenExpr = (ParenExpr)theEObject;
T result = caseParenExpr(parenExpr);
if (result == null) result = caseAtom(parenExpr);
if (result == null) result = caseExpression(parenExpr);
if (result == null) result = defaultCase(theEObject);
return result;
}
case QueryPackage.PROJECT_REFERENCE:
{
ProjectReference projectReference = (ProjectReference)theEObject;
T result = caseProjectReference(projectReference);
if (result == null) result = caseValue(projectReference);
if (result == null) result = caseAtom(projectReference);
if (result == null) result = caseExpression(projectReference);
if (result == null) result = defaultCase(theEObject);
return result;
}
case QueryPackage.TASK_REFERENCE:
{
TaskReference taskReference = (TaskReference)theEObject;
T result = caseTaskReference(taskReference);
if (result == null) result = caseValue(taskReference);
if (result == null) result = caseAtom(taskReference);
if (result == null) result = caseExpression(taskReference);
if (result == null) result = defaultCase(theEObject);
return result;
}
case QueryPackage.TEXT_REFERENCE:
{
TextReference textReference = (TextReference)theEObject;
T result = caseTextReference(textReference);
if (result == null) result = caseValue(textReference);
if (result == null) result = caseAtom(textReference);
if (result == null) result = caseExpression(textReference);
if (result == null) result = defaultCase(theEObject);
return result;
}
case QueryPackage.WORDS:
{
Words words = (Words)theEObject;
T result = caseWords(words);
if (result == null) result = caseAtom(words);
if (result == null) result = caseExpression(words);
if (result == null) result = defaultCase(theEObject);
return result;
}
case QueryPackage.WORD:
{
Word word = (Word)theEObject;
T result = caseWord(word);
if (result == null) result = caseValue(word);
if (result == null) result = caseAtom(word);
if (result == null) result = caseExpression(word);
if (result == null) result = defaultCase(theEObject);
return result;
}
case QueryPackage.PHRASE:
{
Phrase phrase = (Phrase)theEObject;
T result = casePhrase(phrase);
if (result == null) result = caseValue(phrase);
if (result == null) result = caseAtom(phrase);
if (result == null) result = caseExpression(phrase);
if (result == null) result = defaultCase(theEObject);
return result;
}
case QueryPackage.TAG_REFERENCE:
{
TagReference tagReference = (TagReference)theEObject;
T result = caseTagReference(tagReference);
if (result == null) result = caseValue(tagReference);
if (result == null) result = caseAtom(tagReference);
if (result == null) result = caseExpression(tagReference);
if (result == null) result = defaultCase(theEObject);
return result;
}
case QueryPackage.OR_EXPR:
{
OrExpr orExpr = (OrExpr)theEObject;
T result = caseOrExpr(orExpr);
if (result == null) result = caseExpression(orExpr);
if (result == null) result = defaultCase(theEObject);
return result;
}
case QueryPackage.AND_EXPR:
{
AndExpr andExpr = (AndExpr)theEObject;
T result = caseAndExpr(andExpr);
if (result == null) result = caseExpression(andExpr);
if (result == null) result = defaultCase(theEObject);
return result;
}
case QueryPackage.COMP_EQ_EXPR:
{
CompEqExpr compEqExpr = (CompEqExpr)theEObject;
T result = caseCompEqExpr(compEqExpr);
if (result == null) result = caseExpression(compEqExpr);
if (result == null) result = defaultCase(theEObject);
return result;
}
case QueryPackage.COMP_EXPR:
{
CompExpr compExpr = (CompExpr)theEObject;
T result = caseCompExpr(compExpr);
if (result == null) result = caseExpression(compExpr);
if (result == null) result = defaultCase(theEObject);
return result;
}
case QueryPackage.UNARY_EXPR:
{
UnaryExpr unaryExpr = (UnaryExpr)theEObject;
T result = caseUnaryExpr(unaryExpr);
if (result == null) result = caseExpression(unaryExpr);
if (result == null) result = defaultCase(theEObject);
return result;
}
default: return defaultCase(theEObject);
}
}
/**
* Returns the result of interpreting the object as an instance of '<em>Query</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>Query</em>'.
* @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
* @generated
*/
public T caseQuery(Query 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>Atom</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>Atom</em>'.
* @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 '<em>Value</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>Value</em>'.
* @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
* @generated
*/
public T caseValue(Value object)
{
return null;
}
/**
* Returns the result of interpreting the object as an instance of '<em>Paren Expr</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>Paren Expr</em>'.
* @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
* @generated
*/
public T caseParenExpr(ParenExpr object)
{
return null;
}
/**
* Returns the result of interpreting the object as an instance of '<em>Project Reference</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>Project Reference</em>'.
* @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
* @generated
*/
public T caseProjectReference(ProjectReference object)
{
return null;
}
/**
* Returns the result of interpreting the object as an instance of '<em>Task Reference</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>Task Reference</em>'.
* @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
* @generated
*/
public T caseTaskReference(TaskReference object)
{
return null;
}
/**
* Returns the result of interpreting the object as an instance of '<em>Text Reference</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>Text Reference</em>'.
* @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
* @generated
*/
public T caseTextReference(TextReference object)
{
return null;
}
/**
* Returns the result of interpreting the object as an instance of '<em>Words</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>Words</em>'.
* @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
* @generated
*/
public T caseWords(Words object)
{
return null;
}
/**
* Returns the result of interpreting the object as an instance of '<em>Word</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>Word</em>'.
* @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
* @generated
*/
public T caseWord(Word object)
{
return null;
}
/**
* Returns the result of interpreting the object as an instance of '<em>Phrase</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>Phrase</em>'.
* @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
* @generated
*/
public T casePhrase(Phrase object)
{
return null;
}
/**
* Returns the result of interpreting the object as an instance of '<em>Tag Reference</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>Tag Reference</em>'.
* @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
* @generated
*/
public T caseTagReference(TagReference object)
{
return null;
}
/**
* Returns the result of interpreting the object as an instance of '<em>Or Expr</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 Expr</em>'.
* @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
* @generated
*/
public T caseOrExpr(OrExpr object)
{
return null;
}
/**
* Returns the result of interpreting the object as an instance of '<em>And Expr</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 Expr</em>'.
* @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
* @generated
*/
public T caseAndExpr(AndExpr object)
{
return null;
}
/**
* Returns the result of interpreting the object as an instance of '<em>Comp Eq Expr</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>Comp Eq Expr</em>'.
* @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
* @generated
*/
public T caseCompEqExpr(CompEqExpr object)
{
return null;
}
/**
* Returns the result of interpreting the object as an instance of '<em>Comp Expr</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>Comp Expr</em>'.
* @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
* @generated
*/
public T caseCompExpr(CompExpr object)
{
return null;
}
/**
* Returns the result of interpreting the object as an instance of '<em>Unary Expr</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 Expr</em>'.
* @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
* @generated
*/
public T caseUnaryExpr(UnaryExpr 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;
}
} //QuerySwitch