/** * <copyright> * </copyright> * * $Id$ */ package fr.inria.atlanmod.collaboro.history.util; import fr.inria.atlanmod.collaboro.history.*; 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.history.HistoryPackage * @generated */ public class HistorySwitch<T> extends Switch<T> { /** * The cached model package * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ protected static HistoryPackage modelPackage; /** * Creates an instance of the switch. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public HistorySwitch() { if (modelPackage == null) { modelPackage = HistoryPackage.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 HistoryPackage.HISTORY: { History history = (History)theEObject; T result = caseHistory(history); if (result == null) result = defaultCase(theEObject); return result; } case HistoryPackage.VERSION_HISTORY: { VersionHistory versionHistory = (VersionHistory)theEObject; T result = caseVersionHistory(versionHistory); if (result == null) result = defaultCase(theEObject); return result; } case HistoryPackage.ID_ELEMENT: { IdElement idElement = (IdElement)theEObject; T result = caseIdElement(idElement); if (result == null) result = defaultCase(theEObject); return result; } case HistoryPackage.USER: { User user = (User)theEObject; T result = caseUser(user); if (result == null) result = caseIdElement(user); if (result == null) result = defaultCase(theEObject); return result; } case HistoryPackage.VERSION: { Version version = (Version)theEObject; T result = caseVersion(version); if (result == null) result = caseIdElement(version); if (result == null) result = defaultCase(theEObject); return result; } case HistoryPackage.VOTE: { Vote vote = (Vote)theEObject; T result = caseVote(vote); if (result == null) result = defaultCase(theEObject); return result; } case HistoryPackage.COLLABORATION: { Collaboration collaboration = (Collaboration)theEObject; T result = caseCollaboration(collaboration); if (result == null) result = caseIdElement(collaboration); if (result == null) result = defaultCase(theEObject); return result; } case HistoryPackage.PROPOSAL: { Proposal proposal = (Proposal)theEObject; T result = caseProposal(proposal); if (result == null) result = caseCollaboration(proposal); if (result == null) result = caseIdElement(proposal); if (result == null) result = defaultCase(theEObject); return result; } case HistoryPackage.SOLUTION: { Solution solution = (Solution)theEObject; T result = caseSolution(solution); if (result == null) result = caseCollaboration(solution); if (result == null) result = caseIdElement(solution); if (result == null) result = defaultCase(theEObject); return result; } case HistoryPackage.COMMENT: { Comment comment = (Comment)theEObject; T result = caseComment(comment); if (result == null) result = caseCollaboration(comment); if (result == null) result = caseIdElement(comment); if (result == null) result = defaultCase(theEObject); return result; } case HistoryPackage.MODEL_CHANGE: { ModelChange modelChange = (ModelChange)theEObject; T result = caseModelChange(modelChange); if (result == null) result = defaultCase(theEObject); return result; } case HistoryPackage.ADD: { Add add = (Add)theEObject; T result = caseAdd(add); if (result == null) result = caseModelChange(add); if (result == null) result = defaultCase(theEObject); return result; } case HistoryPackage.UPDATE: { Update update = (Update)theEObject; T result = caseUpdate(update); if (result == null) result = caseModelChange(update); if (result == null) result = defaultCase(theEObject); return result; } case HistoryPackage.DELETE: { Delete delete = (Delete)theEObject; T result = caseDelete(delete); if (result == null) result = caseModelChange(delete); if (result == null) result = defaultCase(theEObject); return result; } case HistoryPackage.SYNTAX_ELEMENT: { SyntaxElement syntaxElement = (SyntaxElement)theEObject; T result = caseSyntaxElement(syntaxElement); if (result == null) result = caseIdElement(syntaxElement); if (result == null) result = defaultCase(theEObject); return result; } case HistoryPackage.ABSTRACT_SYNTAX_ELEMENT: { AbstractSyntaxElement abstractSyntaxElement = (AbstractSyntaxElement)theEObject; T result = caseAbstractSyntaxElement(abstractSyntaxElement); if (result == null) result = caseSyntaxElement(abstractSyntaxElement); if (result == null) result = caseIdElement(abstractSyntaxElement); if (result == null) result = defaultCase(theEObject); return result; } case HistoryPackage.EXISTING_ABSTRACT_SYNTAX_ELEMENT: { ExistingAbstractSyntaxElement existingAbstractSyntaxElement = (ExistingAbstractSyntaxElement)theEObject; T result = caseExistingAbstractSyntaxElement(existingAbstractSyntaxElement); if (result == null) result = caseAbstractSyntaxElement(existingAbstractSyntaxElement); if (result == null) result = caseSyntaxElement(existingAbstractSyntaxElement); if (result == null) result = caseIdElement(existingAbstractSyntaxElement); if (result == null) result = defaultCase(theEObject); return result; } case HistoryPackage.NEW_ABSTRACT_SYNTAX_ELEMENT: { NewAbstractSyntaxElement newAbstractSyntaxElement = (NewAbstractSyntaxElement)theEObject; T result = caseNewAbstractSyntaxElement(newAbstractSyntaxElement); if (result == null) result = caseAbstractSyntaxElement(newAbstractSyntaxElement); if (result == null) result = caseSyntaxElement(newAbstractSyntaxElement); if (result == null) result = caseIdElement(newAbstractSyntaxElement); if (result == null) result = defaultCase(theEObject); return result; } case HistoryPackage.CONCRETE_SYNTAX_ELEMENT: { ConcreteSyntaxElement concreteSyntaxElement = (ConcreteSyntaxElement)theEObject; T result = caseConcreteSyntaxElement(concreteSyntaxElement); if (result == null) result = caseSyntaxElement(concreteSyntaxElement); if (result == null) result = caseIdElement(concreteSyntaxElement); if (result == null) result = defaultCase(theEObject); return result; } case HistoryPackage.META_INFO: { MetaInfo metaInfo = (MetaInfo)theEObject; T result = caseMetaInfo(metaInfo); if (result == null) result = defaultCase(theEObject); return result; } case HistoryPackage.PRIORITY: { Priority priority = (Priority)theEObject; T result = casePriority(priority); if (result == null) result = caseMetaInfo(priority); if (result == null) result = defaultCase(theEObject); return result; } case HistoryPackage.TAG_BASED: { TagBased tagBased = (TagBased)theEObject; T result = caseTagBased(tagBased); if (result == null) result = caseMetaInfo(tagBased); if (result == null) result = defaultCase(theEObject); return result; } case HistoryPackage.TAG: { Tag tag = (Tag)theEObject; T result = caseTag(tag); if (result == null) result = defaultCase(theEObject); return result; } default: return defaultCase(theEObject); } } /** * Returns the result of interpreting the object as an instance of '<em>History</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>History</em>'. * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) * @generated */ public T caseHistory(History object) { return null; } /** * Returns the result of interpreting the object as an instance of '<em>Version History</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>Version History</em>'. * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) * @generated */ public T caseVersionHistory(VersionHistory object) { return null; } /** * 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>User</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>User</em>'. * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) * @generated */ public T caseUser(User object) { return null; } /** * Returns the result of interpreting the object as an instance of '<em>Version</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>Version</em>'. * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) * @generated */ public T caseVersion(Version object) { return null; } /** * Returns the result of interpreting the object as an instance of '<em>Vote</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>Vote</em>'. * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) * @generated */ public T caseVote(Vote object) { return null; } /** * Returns the result of interpreting the object as an instance of '<em>Collaboration</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>Collaboration</em>'. * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) * @generated */ public T caseCollaboration(Collaboration object) { return null; } /** * Returns the result of interpreting the object as an instance of '<em>Proposal</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>Proposal</em>'. * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) * @generated */ public T caseProposal(Proposal object) { return null; } /** * Returns the result of interpreting the object as an instance of '<em>Solution</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>Solution</em>'. * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) * @generated */ public T caseSolution(Solution object) { return null; } /** * Returns the result of interpreting the object as an instance of '<em>Comment</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>Comment</em>'. * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) * @generated */ public T caseComment(Comment object) { return null; } /** * Returns the result of interpreting the object as an instance of '<em>Model Change</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 Change</em>'. * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) * @generated */ public T caseModelChange(ModelChange 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>Update</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>Update</em>'. * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) * @generated */ public T caseUpdate(Update object) { return null; } /** * Returns the result of interpreting the object as an instance of '<em>Delete</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>Delete</em>'. * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) * @generated */ public T caseDelete(Delete object) { return null; } /** * Returns the result of interpreting the object as an instance of '<em>Syntax 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>Syntax Element</em>'. * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) * @generated */ public T caseSyntaxElement(SyntaxElement object) { return null; } /** * Returns the result of interpreting the object as an instance of '<em>Abstract Syntax 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 Syntax Element</em>'. * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) * @generated */ public T caseAbstractSyntaxElement(AbstractSyntaxElement object) { return null; } /** * Returns the result of interpreting the object as an instance of '<em>Existing Abstract Syntax 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>Existing Abstract Syntax Element</em>'. * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) * @generated */ public T caseExistingAbstractSyntaxElement(ExistingAbstractSyntaxElement object) { return null; } /** * Returns the result of interpreting the object as an instance of '<em>New Abstract Syntax 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>New Abstract Syntax Element</em>'. * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) * @generated */ public T caseNewAbstractSyntaxElement(NewAbstractSyntaxElement object) { return null; } /** * Returns the result of interpreting the object as an instance of '<em>Concrete Syntax 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>Concrete Syntax Element</em>'. * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) * @generated */ public T caseConcreteSyntaxElement(ConcreteSyntaxElement object) { return null; } /** * Returns the result of interpreting the object as an instance of '<em>Meta Info</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>Meta Info</em>'. * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) * @generated */ public T caseMetaInfo(MetaInfo object) { return null; } /** * Returns the result of interpreting the object as an instance of '<em>Priority</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>Priority</em>'. * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) * @generated */ public T casePriority(Priority object) { return null; } /** * Returns the result of interpreting the object as an instance of '<em>Tag Based</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 Based</em>'. * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) * @generated */ public T caseTagBased(TagBased object) { return null; } /** * Returns the result of interpreting the object as an instance of '<em>Tag</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</em>'. * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) * @generated */ public T caseTag(Tag 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; } } //HistorySwitch