/** */ package de.ugoe.cs.swe.bnftools.ebnf.util; import de.ugoe.cs.swe.bnftools.ebnf.*; import org.eclipse.emf.ecore.EObject; import org.eclipse.emf.ecore.EPackage; import org.eclipse.emf.ecore.util.Switch; /** * * The Switch for the model's inheritance hierarchy. * It supports the call {@link #doSwitch(EObject) doSwitch(object)} * to invoke the caseXXX 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. * * @see de.ugoe.cs.swe.bnftools.ebnf.EbnfPackage * @generated */ public class EbnfSwitch extends Switch { /** * The cached model package * * * @generated */ protected static EbnfPackage modelPackage; /** * Creates an instance of the switch. * * * @generated */ public EbnfSwitch() { if (modelPackage == null) { modelPackage = EbnfPackage.eINSTANCE; } } /** * Checks whether this is a switch for the given package. * * * @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 caseXXX for each class of the model until one returns a non null result; it yields that result. * * * @return the first non-null result returned by a caseXXX call. * @generated */ @Override protected T doSwitch(int classifierID, EObject theEObject) { switch (classifierID) { case EbnfPackage.ETSI_BNF: { EtsiBnf etsiBnf = (EtsiBnf)theEObject; T result = caseEtsiBnf(etsiBnf); if (result == null) result = defaultCase(theEObject); return result; } case EbnfPackage.IMPORT_SECTION: { ImportSection importSection = (ImportSection)theEObject; T result = caseImportSection(importSection); if (result == null) result = defaultCase(theEObject); return result; } case EbnfPackage.BNF_ENTRY: { BnfEntry bnfEntry = (BnfEntry)theEObject; T result = caseBnfEntry(bnfEntry); if (result == null) result = defaultCase(theEObject); return result; } case EbnfPackage.DELTA_ENTRY: { DeltaEntry deltaEntry = (DeltaEntry)theEObject; T result = caseDeltaEntry(deltaEntry); if (result == null) result = defaultCase(theEObject); return result; } case EbnfPackage.MERGE_ENTRY: { MergeEntry mergeEntry = (MergeEntry)theEObject; T result = caseMergeEntry(mergeEntry); if (result == null) result = defaultCase(theEObject); return result; } case EbnfPackage.SECTION_HEADING: { SectionHeading sectionHeading = (SectionHeading)theEObject; T result = caseSectionHeading(sectionHeading); if (result == null) result = defaultCase(theEObject); return result; } case EbnfPackage.IMPORT: { Import import_ = (Import)theEObject; T result = caseImport(import_); if (result == null) result = defaultCase(theEObject); return result; } case EbnfPackage.RULE: { Rule rule = (Rule)theEObject; T result = caseRule(rule); if (result == null) result = defaultCase(theEObject); return result; } case EbnfPackage.EXT_RULE: { ExtRule extRule = (ExtRule)theEObject; T result = caseExtRule(extRule); if (result == null) result = defaultCase(theEObject); return result; } case EbnfPackage.MERGE_RULE: { MergeRule mergeRule = (MergeRule)theEObject; T result = caseMergeRule(mergeRule); if (result == null) result = defaultCase(theEObject); return result; } case EbnfPackage.GLOBAL_COMBINATOR: { GlobalCombinator globalCombinator = (GlobalCombinator)theEObject; T result = caseGlobalCombinator(globalCombinator); if (result == null) result = caseMergeRule(globalCombinator); if (result == null) result = defaultCase(theEObject); return result; } case EbnfPackage.RULE_COMBINATOR: { RuleCombinator ruleCombinator = (RuleCombinator)theEObject; T result = caseRuleCombinator(ruleCombinator); if (result == null) result = caseMergeRule(ruleCombinator); if (result == null) result = defaultCase(theEObject); return result; } case EbnfPackage.HOOK_COMBINATOR: { HookCombinator hookCombinator = (HookCombinator)theEObject; T result = caseHookCombinator(hookCombinator); if (result == null) result = caseMergeRule(hookCombinator); if (result == null) result = defaultCase(theEObject); return result; } case EbnfPackage.DEFINITION_LIST: { DefinitionList definitionList = (DefinitionList)theEObject; T result = caseDefinitionList(definitionList); if (result == null) result = defaultCase(theEObject); return result; } case EbnfPackage.SINGLE_DEFINITION: { SingleDefinition singleDefinition = (SingleDefinition)theEObject; T result = caseSingleDefinition(singleDefinition); if (result == null) result = defaultCase(theEObject); return result; } case EbnfPackage.TERM: { Term term = (Term)theEObject; T result = caseTerm(term); if (result == null) result = defaultCase(theEObject); return result; } case EbnfPackage.ATOM: { Atom atom = (Atom)theEObject; T result = caseAtom(atom); if (result == null) result = defaultCase(theEObject); return result; } case EbnfPackage.RULE_REFERENCE: { RuleReference ruleReference = (RuleReference)theEObject; T result = caseRuleReference(ruleReference); if (result == null) result = defaultCase(theEObject); return result; } case EbnfPackage.STRING_RULE: { StringRule stringRule = (StringRule)theEObject; T result = caseStringRule(stringRule); if (result == null) result = defaultCase(theEObject); return result; } case EbnfPackage.GROUPED_SEQUENCE: { GroupedSequence groupedSequence = (GroupedSequence)theEObject; T result = caseGroupedSequence(groupedSequence); if (result == null) result = defaultCase(theEObject); return result; } case EbnfPackage.OPTIONAL_SEQUENCE: { OptionalSequence optionalSequence = (OptionalSequence)theEObject; T result = caseOptionalSequence(optionalSequence); if (result == null) result = defaultCase(theEObject); return result; } case EbnfPackage.REPEATED_SEQUENCE: { RepeatedSequence repeatedSequence = (RepeatedSequence)theEObject; T result = caseRepeatedSequence(repeatedSequence); if (result == null) result = defaultCase(theEObject); return result; } case EbnfPackage.REPEAT_RANGE: { RepeatRange repeatRange = (RepeatRange)theEObject; T result = caseRepeatRange(repeatRange); if (result == null) result = defaultCase(theEObject); return result; } default: return defaultCase(theEObject); } } /** * Returns the result of interpreting the object as an instance of 'Etsi Bnf'. * * This implementation returns null; * returning a non-null result will terminate the switch. * * @param object the target of the switch. * @return the result of interpreting the object as an instance of 'Etsi Bnf'. * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) * @generated */ public T caseEtsiBnf(EtsiBnf object) { return null; } /** * Returns the result of interpreting the object as an instance of 'Import Section'. * * This implementation returns null; * returning a non-null result will terminate the switch. * * @param object the target of the switch. * @return the result of interpreting the object as an instance of 'Import Section'. * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) * @generated */ public T caseImportSection(ImportSection object) { return null; } /** * Returns the result of interpreting the object as an instance of 'Bnf Entry'. * * This implementation returns null; * returning a non-null result will terminate the switch. * * @param object the target of the switch. * @return the result of interpreting the object as an instance of 'Bnf Entry'. * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) * @generated */ public T caseBnfEntry(BnfEntry object) { return null; } /** * Returns the result of interpreting the object as an instance of 'Delta Entry'. * * This implementation returns null; * returning a non-null result will terminate the switch. * * @param object the target of the switch. * @return the result of interpreting the object as an instance of 'Delta Entry'. * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) * @generated */ public T caseDeltaEntry(DeltaEntry object) { return null; } /** * Returns the result of interpreting the object as an instance of 'Merge Entry'. * * This implementation returns null; * returning a non-null result will terminate the switch. * * @param object the target of the switch. * @return the result of interpreting the object as an instance of 'Merge Entry'. * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) * @generated */ public T caseMergeEntry(MergeEntry object) { return null; } /** * Returns the result of interpreting the object as an instance of 'Section Heading'. * * This implementation returns null; * returning a non-null result will terminate the switch. * * @param object the target of the switch. * @return the result of interpreting the object as an instance of 'Section Heading'. * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) * @generated */ public T caseSectionHeading(SectionHeading object) { return null; } /** * Returns the result of interpreting the object as an instance of 'Import'. * * This implementation returns null; * returning a non-null result will terminate the switch. * * @param object the target of the switch. * @return the result of interpreting the object as an instance of 'Import'. * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) * @generated */ public T caseImport(Import object) { return null; } /** * Returns the result of interpreting the object as an instance of 'Rule'. * * This implementation returns null; * returning a non-null result will terminate the switch. * * @param object the target of the switch. * @return the result of interpreting the object as an instance of 'Rule'. * @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 'Ext Rule'. * * This implementation returns null; * returning a non-null result will terminate the switch. * * @param object the target of the switch. * @return the result of interpreting the object as an instance of 'Ext Rule'. * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) * @generated */ public T caseExtRule(ExtRule object) { return null; } /** * Returns the result of interpreting the object as an instance of 'Merge Rule'. * * This implementation returns null; * returning a non-null result will terminate the switch. * * @param object the target of the switch. * @return the result of interpreting the object as an instance of 'Merge Rule'. * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) * @generated */ public T caseMergeRule(MergeRule object) { return null; } /** * Returns the result of interpreting the object as an instance of 'Global Combinator'. * * This implementation returns null; * returning a non-null result will terminate the switch. * * @param object the target of the switch. * @return the result of interpreting the object as an instance of 'Global Combinator'. * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) * @generated */ public T caseGlobalCombinator(GlobalCombinator object) { return null; } /** * Returns the result of interpreting the object as an instance of 'Rule Combinator'. * * This implementation returns null; * returning a non-null result will terminate the switch. * * @param object the target of the switch. * @return the result of interpreting the object as an instance of 'Rule Combinator'. * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) * @generated */ public T caseRuleCombinator(RuleCombinator object) { return null; } /** * Returns the result of interpreting the object as an instance of 'Hook Combinator'. * * This implementation returns null; * returning a non-null result will terminate the switch. * * @param object the target of the switch. * @return the result of interpreting the object as an instance of 'Hook Combinator'. * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) * @generated */ public T caseHookCombinator(HookCombinator object) { return null; } /** * Returns the result of interpreting the object as an instance of 'Definition List'. * * This implementation returns null; * returning a non-null result will terminate the switch. * * @param object the target of the switch. * @return the result of interpreting the object as an instance of 'Definition List'. * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) * @generated */ public T caseDefinitionList(DefinitionList object) { return null; } /** * Returns the result of interpreting the object as an instance of 'Single Definition'. * * This implementation returns null; * returning a non-null result will terminate the switch. * * @param object the target of the switch. * @return the result of interpreting the object as an instance of 'Single Definition'. * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) * @generated */ public T caseSingleDefinition(SingleDefinition object) { return null; } /** * Returns the result of interpreting the object as an instance of 'Term'. * * This implementation returns null; * returning a non-null result will terminate the switch. * * @param object the target of the switch. * @return the result of interpreting the object as an instance of 'Term'. * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) * @generated */ public T caseTerm(Term object) { return null; } /** * Returns the result of interpreting the object as an instance of 'Atom'. * * This implementation returns null; * returning a non-null result will terminate the switch. * * @param object the target of the switch. * @return the result of interpreting the object as an instance of 'Atom'. * @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 'Rule Reference'. * * This implementation returns null; * returning a non-null result will terminate the switch. * * @param object the target of the switch. * @return the result of interpreting the object as an instance of 'Rule Reference'. * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) * @generated */ public T caseRuleReference(RuleReference object) { return null; } /** * Returns the result of interpreting the object as an instance of 'String Rule'. * * This implementation returns null; * returning a non-null result will terminate the switch. * * @param object the target of the switch. * @return the result of interpreting the object as an instance of 'String Rule'. * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) * @generated */ public T caseStringRule(StringRule object) { return null; } /** * Returns the result of interpreting the object as an instance of 'Grouped Sequence'. * * This implementation returns null; * returning a non-null result will terminate the switch. * * @param object the target of the switch. * @return the result of interpreting the object as an instance of 'Grouped Sequence'. * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) * @generated */ public T caseGroupedSequence(GroupedSequence object) { return null; } /** * Returns the result of interpreting the object as an instance of 'Optional Sequence'. * * This implementation returns null; * returning a non-null result will terminate the switch. * * @param object the target of the switch. * @return the result of interpreting the object as an instance of 'Optional Sequence'. * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) * @generated */ public T caseOptionalSequence(OptionalSequence object) { return null; } /** * Returns the result of interpreting the object as an instance of 'Repeated Sequence'. * * This implementation returns null; * returning a non-null result will terminate the switch. * * @param object the target of the switch. * @return the result of interpreting the object as an instance of 'Repeated Sequence'. * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) * @generated */ public T caseRepeatedSequence(RepeatedSequence object) { return null; } /** * Returns the result of interpreting the object as an instance of 'Repeat Range'. * * This implementation returns null; * returning a non-null result will terminate the switch. * * @param object the target of the switch. * @return the result of interpreting the object as an instance of 'Repeat Range'. * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) * @generated */ public T caseRepeatRange(RepeatRange object) { return null; } /** * Returns the result of interpreting the object as an instance of 'EObject'. * * This implementation returns null; * returning a non-null result will terminate the switch, but this is the last case anyway. * * @param object the target of the switch. * @return the result of interpreting the object as an instance of 'EObject'. * @see #doSwitch(org.eclipse.emf.ecore.EObject) * @generated */ @Override public T defaultCase(EObject object) { return null; } } //EbnfSwitch