/**
*/
package emfviews.dsl.sqlview.util;
import emfviews.dsl.sqlview.Attribute;
import emfviews.dsl.sqlview.Comparison;
import emfviews.dsl.sqlview.Condition;
import emfviews.dsl.sqlview.EclExpression;
import emfviews.dsl.sqlview.Expression;
import emfviews.dsl.sqlview.From;
import emfviews.dsl.sqlview.Join;
import emfviews.dsl.sqlview.JoinLeft;
import emfviews.dsl.sqlview.JoinRight;
import emfviews.dsl.sqlview.Left;
import emfviews.dsl.sqlview.Metamodel;
import emfviews.dsl.sqlview.MetamodelName;
import emfviews.dsl.sqlview.Model;
import emfviews.dsl.sqlview.Relation;
import emfviews.dsl.sqlview.Right;
import emfviews.dsl.sqlview.Select;
import emfviews.dsl.sqlview.SelectAttribute;
import emfviews.dsl.sqlview.SqlviewPackage;
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 emfviews.dsl.sqlview.SqlviewPackage
* @generated
*/
public class SqlviewSwitch<T> extends Switch<T>
{
/**
* The cached model package
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
protected static SqlviewPackage modelPackage;
/**
* Creates an instance of the switch.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public SqlviewSwitch()
{
if (modelPackage == null)
{
modelPackage = SqlviewPackage.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 SqlviewPackage.MODEL:
{
Model model = (Model)theEObject;
T result = caseModel(model);
if (result == null) result = defaultCase(theEObject);
return result;
}
case SqlviewPackage.METAMODEL:
{
Metamodel metamodel = (Metamodel)theEObject;
T result = caseMetamodel(metamodel);
if (result == null) result = defaultCase(theEObject);
return result;
}
case SqlviewPackage.EXPRESSION:
{
Expression expression = (Expression)theEObject;
T result = caseExpression(expression);
if (result == null) result = defaultCase(theEObject);
return result;
}
case SqlviewPackage.SELECT:
{
Select select = (Select)theEObject;
T result = caseSelect(select);
if (result == null) result = defaultCase(theEObject);
return result;
}
case SqlviewPackage.SELECT_ATTRIBUTE:
{
SelectAttribute selectAttribute = (SelectAttribute)theEObject;
T result = caseSelectAttribute(selectAttribute);
if (result == null) result = defaultCase(theEObject);
return result;
}
case SqlviewPackage.FROM:
{
From from = (From)theEObject;
T result = caseFrom(from);
if (result == null) result = defaultCase(theEObject);
return result;
}
case SqlviewPackage.JOIN:
{
Join join = (Join)theEObject;
T result = caseJoin(join);
if (result == null) result = defaultCase(theEObject);
return result;
}
case SqlviewPackage.JOIN_LEFT:
{
JoinLeft joinLeft = (JoinLeft)theEObject;
T result = caseJoinLeft(joinLeft);
if (result == null) result = defaultCase(theEObject);
return result;
}
case SqlviewPackage.JOIN_RIGHT:
{
JoinRight joinRight = (JoinRight)theEObject;
T result = caseJoinRight(joinRight);
if (result == null) result = defaultCase(theEObject);
return result;
}
case SqlviewPackage.ATTRIBUTE:
{
Attribute attribute = (Attribute)theEObject;
T result = caseAttribute(attribute);
if (result == null) result = defaultCase(theEObject);
return result;
}
case SqlviewPackage.CLASS:
{
emfviews.dsl.sqlview.Class class_ = (emfviews.dsl.sqlview.Class)theEObject;
T result = caseClass(class_);
if (result == null) result = defaultCase(theEObject);
return result;
}
case SqlviewPackage.METAMODEL_NAME:
{
MetamodelName metamodelName = (MetamodelName)theEObject;
T result = caseMetamodelName(metamodelName);
if (result == null) result = defaultCase(theEObject);
return result;
}
case SqlviewPackage.RELATION:
{
Relation relation = (Relation)theEObject;
T result = caseRelation(relation);
if (result == null) result = defaultCase(theEObject);
return result;
}
case SqlviewPackage.CONDITION:
{
Condition condition = (Condition)theEObject;
T result = caseCondition(condition);
if (result == null) result = defaultCase(theEObject);
return result;
}
case SqlviewPackage.ECL_EXPRESSION:
{
EclExpression eclExpression = (EclExpression)theEObject;
T result = caseEclExpression(eclExpression);
if (result == null) result = defaultCase(theEObject);
return result;
}
case SqlviewPackage.COMPARISON:
{
Comparison comparison = (Comparison)theEObject;
T result = caseComparison(comparison);
if (result == null) result = defaultCase(theEObject);
return result;
}
case SqlviewPackage.LEFT:
{
Left left = (Left)theEObject;
T result = caseLeft(left);
if (result == null) result = defaultCase(theEObject);
return result;
}
case SqlviewPackage.RIGHT:
{
Right right = (Right)theEObject;
T result = caseRight(right);
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>Metamodel</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>Metamodel</em>'.
* @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
* @generated
*/
public T caseMetamodel(Metamodel 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>Select</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>Select</em>'.
* @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
* @generated
*/
public T caseSelect(Select object)
{
return null;
}
/**
* Returns the result of interpreting the object as an instance of '<em>Select Attribute</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>Select Attribute</em>'.
* @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
* @generated
*/
public T caseSelectAttribute(SelectAttribute object)
{
return null;
}
/**
* Returns the result of interpreting the object as an instance of '<em>From</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>From</em>'.
* @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
* @generated
*/
public T caseFrom(From object)
{
return null;
}
/**
* Returns the result of interpreting the object as an instance of '<em>Join</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>Join</em>'.
* @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
* @generated
*/
public T caseJoin(Join object)
{
return null;
}
/**
* Returns the result of interpreting the object as an instance of '<em>Join Left</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>Join Left</em>'.
* @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
* @generated
*/
public T caseJoinLeft(JoinLeft object)
{
return null;
}
/**
* Returns the result of interpreting the object as an instance of '<em>Join Right</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>Join Right</em>'.
* @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
* @generated
*/
public T caseJoinRight(JoinRight object)
{
return null;
}
/**
* Returns the result of interpreting the object as an instance of '<em>Attribute</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>Attribute</em>'.
* @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
* @generated
*/
public T caseAttribute(Attribute object)
{
return null;
}
/**
* Returns the result of interpreting the object as an instance of '<em>Class</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>Class</em>'.
* @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
* @generated
*/
public T caseClass(emfviews.dsl.sqlview.Class object)
{
return null;
}
/**
* Returns the result of interpreting the object as an instance of '<em>Metamodel Name</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>Metamodel Name</em>'.
* @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
* @generated
*/
public T caseMetamodelName(MetamodelName object)
{
return null;
}
/**
* Returns the result of interpreting the object as an instance of '<em>Relation</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>Relation</em>'.
* @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 '<em>Condition</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>Condition</em>'.
* @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
* @generated
*/
public T caseCondition(Condition object)
{
return null;
}
/**
* Returns the result of interpreting the object as an instance of '<em>Ecl 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>Ecl Expression</em>'.
* @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
* @generated
*/
public T caseEclExpression(EclExpression 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>Left</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>Left</em>'.
* @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
* @generated
*/
public T caseLeft(Left object)
{
return null;
}
/**
* Returns the result of interpreting the object as an instance of '<em>Right</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>Right</em>'.
* @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
* @generated
*/
public T caseRight(Right 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;
}
} //SqlviewSwitch