/**
* <copyright>
* </copyright>
*
* $Id$
*/
package fr.inria.atlanmod.collaboro.notation.util;
import fr.inria.atlanmod.collaboro.notation.*;
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 fr.inria.atlanmod.collaboro.notation.NotationPackage
* @generated
*/
public class NotationSwitch<T> extends Switch<T> {
/**
* The cached model package
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
protected static NotationPackage modelPackage;
/**
* Creates an instance of the switch.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public NotationSwitch() {
if (modelPackage == null) {
modelPackage = NotationPackage.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 NotationPackage.ID_ELEMENT: {
IdElement idElement = (IdElement)theEObject;
T result = caseIdElement(idElement);
if (result == null) result = defaultCase(theEObject);
return result;
}
case NotationPackage.NOTATION_ELEMENT: {
NotationElement notationElement = (NotationElement)theEObject;
T result = caseNotationElement(notationElement);
if (result == null) result = caseIdElement(notationElement);
if (result == null) result = defaultCase(theEObject);
return result;
}
case NotationPackage.GRAPHICAL_ELEMENT: {
GraphicalElement graphicalElement = (GraphicalElement)theEObject;
T result = caseGraphicalElement(graphicalElement);
if (result == null) result = caseNotationElement(graphicalElement);
if (result == null) result = caseIdElement(graphicalElement);
if (result == null) result = defaultCase(theEObject);
return result;
}
case NotationPackage.IMAGE: {
Image image = (Image)theEObject;
T result = caseImage(image);
if (result == null) result = caseGraphicalElement(image);
if (result == null) result = caseNotationElement(image);
if (result == null) result = caseIdElement(image);
if (result == null) result = defaultCase(theEObject);
return result;
}
case NotationPackage.FIGURE: {
Figure figure = (Figure)theEObject;
T result = caseFigure(figure);
if (result == null) result = caseGraphicalElement(figure);
if (result == null) result = caseNotationElement(figure);
if (result == null) result = caseIdElement(figure);
if (result == null) result = defaultCase(theEObject);
return result;
}
case NotationPackage.RECTANGLE: {
Rectangle rectangle = (Rectangle)theEObject;
T result = caseRectangle(rectangle);
if (result == null) result = caseFigure(rectangle);
if (result == null) result = caseGraphicalElement(rectangle);
if (result == null) result = caseNotationElement(rectangle);
if (result == null) result = caseIdElement(rectangle);
if (result == null) result = defaultCase(theEObject);
return result;
}
case NotationPackage.LINE: {
Line line = (Line)theEObject;
T result = caseLine(line);
if (result == null) result = caseGraphicalElement(line);
if (result == null) result = caseNotationElement(line);
if (result == null) result = caseIdElement(line);
if (result == null) result = defaultCase(theEObject);
return result;
}
case NotationPackage.LABEL: {
Label label = (Label)theEObject;
T result = caseLabel(label);
if (result == null) result = caseGraphicalElement(label);
if (result == null) result = caseNotationElement(label);
if (result == null) result = caseIdElement(label);
if (result == null) result = defaultCase(theEObject);
return result;
}
case NotationPackage.TEXTUAL_ELEMENT: {
TextualElement textualElement = (TextualElement)theEObject;
T result = caseTextualElement(textualElement);
if (result == null) result = caseNotationElement(textualElement);
if (result == null) result = caseIdElement(textualElement);
if (result == null) result = defaultCase(theEObject);
return result;
}
case NotationPackage.TOKEN: {
Token token = (Token)theEObject;
T result = caseToken(token);
if (result == null) result = caseTextualElement(token);
if (result == null) result = caseNotationElement(token);
if (result == null) result = caseIdElement(token);
if (result == null) result = defaultCase(theEObject);
return result;
}
case NotationPackage.KEYWORD: {
Keyword keyword = (Keyword)theEObject;
T result = caseKeyword(keyword);
if (result == null) result = caseTextualElement(keyword);
if (result == null) result = caseNotationElement(keyword);
if (result == null) result = caseIdElement(keyword);
if (result == null) result = defaultCase(theEObject);
return result;
}
case NotationPackage.VALUE: {
Value value = (Value)theEObject;
T result = caseValue(value);
if (result == null) result = caseTextualElement(value);
if (result == null) result = caseNotationElement(value);
if (result == null) result = caseIdElement(value);
if (result == null) result = defaultCase(theEObject);
return result;
}
case NotationPackage.ATTRIBUTE_VALUE: {
AttributeValue attributeValue = (AttributeValue)theEObject;
T result = caseAttributeValue(attributeValue);
if (result == null) result = caseValue(attributeValue);
if (result == null) result = caseTextualElement(attributeValue);
if (result == null) result = caseNotationElement(attributeValue);
if (result == null) result = caseIdElement(attributeValue);
if (result == null) result = defaultCase(theEObject);
return result;
}
case NotationPackage.REFERENCE_VALUE: {
ReferenceValue referenceValue = (ReferenceValue)theEObject;
T result = caseReferenceValue(referenceValue);
if (result == null) result = caseValue(referenceValue);
if (result == null) result = caseTextualElement(referenceValue);
if (result == null) result = caseNotationElement(referenceValue);
if (result == null) result = caseIdElement(referenceValue);
if (result == null) result = defaultCase(theEObject);
return result;
}
case NotationPackage.SYNTAX_OF: {
SyntaxOf syntaxOf = (SyntaxOf)theEObject;
T result = caseSyntaxOf(syntaxOf);
if (result == null) result = caseNotationElement(syntaxOf);
if (result == null) result = caseIdElement(syntaxOf);
if (result == null) result = defaultCase(theEObject);
return result;
}
case NotationPackage.COMPOSITE: {
Composite composite = (Composite)theEObject;
T result = caseComposite(composite);
if (result == null) result = caseNotationElement(composite);
if (result == null) result = caseIdElement(composite);
if (result == null) result = defaultCase(theEObject);
return result;
}
case NotationPackage.DEFINITION: {
Definition definition = (Definition)theEObject;
T result = caseDefinition(definition);
if (result == null) result = defaultCase(theEObject);
return result;
}
default: return defaultCase(theEObject);
}
}
/**
* Returns the result of interpreting the object as an instance of '<em>Id 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>Id Element</em>'.
* @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
* @generated
*/
public T caseIdElement(IdElement object) {
return null;
}
/**
* Returns the result of interpreting the object as an instance of '<em>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>Element</em>'.
* @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
* @generated
*/
public T caseNotationElement(NotationElement object) {
return null;
}
/**
* Returns the result of interpreting the object as an instance of '<em>Graphical 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>Graphical Element</em>'.
* @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
* @generated
*/
public T caseGraphicalElement(GraphicalElement object) {
return null;
}
/**
* Returns the result of interpreting the object as an instance of '<em>Image</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>Image</em>'.
* @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
* @generated
*/
public T caseImage(Image object) {
return null;
}
/**
* Returns the result of interpreting the object as an instance of '<em>Figure</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>Figure</em>'.
* @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
* @generated
*/
public T caseFigure(Figure object) {
return null;
}
/**
* Returns the result of interpreting the object as an instance of '<em>Rectangle</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>Rectangle</em>'.
* @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
* @generated
*/
public T caseRectangle(Rectangle object) {
return null;
}
/**
* Returns the result of interpreting the object as an instance of '<em>Line</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>Line</em>'.
* @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
* @generated
*/
public T caseLine(Line object) {
return null;
}
/**
* Returns the result of interpreting the object as an instance of '<em>Label</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>Label</em>'.
* @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
* @generated
*/
public T caseLabel(Label object) {
return null;
}
/**
* Returns the result of interpreting the object as an instance of '<em>Textual 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>Textual Element</em>'.
* @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
* @generated
*/
public T caseTextualElement(TextualElement object) {
return null;
}
/**
* Returns the result of interpreting the object as an instance of '<em>Token</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>Token</em>'.
* @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
* @generated
*/
public T caseToken(Token object) {
return null;
}
/**
* Returns the result of interpreting the object as an instance of '<em>Keyword</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>Keyword</em>'.
* @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
* @generated
*/
public T caseKeyword(Keyword 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>Attribute 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>Attribute Value</em>'.
* @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
* @generated
*/
public T caseAttributeValue(AttributeValue object) {
return null;
}
/**
* Returns the result of interpreting the object as an instance of '<em>Reference 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>Reference Value</em>'.
* @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
* @generated
*/
public T caseReferenceValue(ReferenceValue object) {
return null;
}
/**
* Returns the result of interpreting the object as an instance of '<em>Syntax Of</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>Syntax Of</em>'.
* @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
* @generated
*/
public T caseSyntaxOf(SyntaxOf object) {
return null;
}
/**
* Returns the result of interpreting the object as an instance of '<em>Composite</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>Composite</em>'.
* @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
* @generated
*/
public T caseComposite(Composite object) {
return null;
}
/**
* Returns the result of interpreting the object as an instance of '<em>Definition</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>Definition</em>'.
* @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
* @generated
*/
public T caseDefinition(Definition 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;
}
} //NotationSwitch