All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.nasdanika.html.model.components.util.ComponentsSwitch Maven / Gradle / Ivy

The newest version!
/**
 */
package org.nasdanika.html.model.components.util;

import org.eclipse.emf.ecore.EObject;
import org.eclipse.emf.ecore.EPackage;

import org.eclipse.emf.ecore.util.Switch;

import org.nasdanika.html.model.bootstrap.BootstrapElement;
import org.nasdanika.html.model.bootstrap.TableConfiguration;

import org.nasdanika.html.model.components.*;

import org.nasdanika.html.model.html.HtmlElement;

import org.nasdanika.ncore.ModelElement;

/**
 * 
 * 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 org.nasdanika.html.model.components.ComponentsPackage
 * @generated
 */
public class ComponentsSwitch extends Switch {
	/**
	 * The cached model package
	 * 
	 * 
	 * @generated
	 */
	protected static ComponentsPackage modelPackage;

	/**
	 * Creates an instance of the switch.
	 * 
	 * 
	 * @generated
	 */
	public ComponentsSwitch() {
		if (modelPackage == null) {
			modelPackage = ComponentsPackage.eINSTANCE;
		}
	}

	/**
	 * Checks whether this is a switch for the given package.
	 * 
	 * 
	 * @param 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 ComponentsPackage.TABLE_OF_CONTENTS_BASE: {
				TableOfContentsBase tableOfContentsBase = (TableOfContentsBase)theEObject;
				T result = caseTableOfContentsBase(tableOfContentsBase);
				if (result == null) result = caseBootstrapElement(tableOfContentsBase);
				if (result == null) result = caseHtmlElement(tableOfContentsBase);
				if (result == null) result = caseModelElement(tableOfContentsBase);
				if (result == null) result = defaultCase(theEObject);
				return result;
			}
			case ComponentsPackage.TABLE_OF_CONTENTS: {
				TableOfContents tableOfContents = (TableOfContents)theEObject;
				T result = caseTableOfContents(tableOfContents);
				if (result == null) result = caseTableOfContentsBase(tableOfContents);
				if (result == null) result = caseTableConfiguration(tableOfContents);
				if (result == null) result = caseBootstrapElement(tableOfContents);
				if (result == null) result = caseHtmlElement(tableOfContents);
				if (result == null) result = caseModelElement(tableOfContents);
				if (result == null) result = defaultCase(theEObject);
				return result;
			}
			case ComponentsPackage.LIST_OF_CONTENTS: {
				ListOfContents listOfContents = (ListOfContents)theEObject;
				T result = caseListOfContents(listOfContents);
				if (result == null) result = caseTableOfContentsBase(listOfContents);
				if (result == null) result = caseBootstrapElement(listOfContents);
				if (result == null) result = caseHtmlElement(listOfContents);
				if (result == null) result = caseModelElement(listOfContents);
				if (result == null) result = defaultCase(theEObject);
				return result;
			}
			case ComponentsPackage.TEXT_TO_SPEECH: {
				TextToSpeech textToSpeech = (TextToSpeech)theEObject;
				T result = caseTextToSpeech(textToSpeech);
				if (result == null) result = caseModelElement(textToSpeech);
				if (result == null) result = defaultCase(theEObject);
				return result;
			}
			case ComponentsPackage.TEXT_TO_SPEECH_TEXT: {
				TextToSpeechText textToSpeechText = (TextToSpeechText)theEObject;
				T result = caseTextToSpeechText(textToSpeechText);
				if (result == null) result = caseTextToSpeech(textToSpeechText);
				if (result == null) result = caseModelElement(textToSpeechText);
				if (result == null) result = defaultCase(theEObject);
				return result;
			}
			case ComponentsPackage.TEXT_TO_SPEECH_RESOURCE: {
				TextToSpeechResource textToSpeechResource = (TextToSpeechResource)theEObject;
				T result = caseTextToSpeechResource(textToSpeechResource);
				if (result == null) result = caseTextToSpeech(textToSpeechResource);
				if (result == null) result = caseModelElement(textToSpeechResource);
				if (result == null) result = defaultCase(theEObject);
				return result;
			}
			default: return defaultCase(theEObject);
		}
	}

	/**
	 * Returns the result of interpreting the object as an instance of 'Table Of Contents Base'.
	 * 
	 * 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 'Table Of Contents Base'.
	 * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
	 * @generated
	 */
	public T caseTableOfContentsBase(TableOfContentsBase object) {
		return null;
	}

	/**
	 * Returns the result of interpreting the object as an instance of 'Table Of Contents'.
	 * 
	 * 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 'Table Of Contents'.
	 * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
	 * @generated
	 */
	public T caseTableOfContents(TableOfContents object) {
		return null;
	}

	/**
	 * Returns the result of interpreting the object as an instance of 'List Of Contents'.
	 * 
	 * 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 'List Of Contents'.
	 * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
	 * @generated
	 */
	public T caseListOfContents(ListOfContents object) {
		return null;
	}

	/**
	 * Returns the result of interpreting the object as an instance of 'Text To Speech'.
	 * 
	 * 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 'Text To Speech'.
	 * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
	 * @generated
	 */
	public T caseTextToSpeech(TextToSpeech object) {
		return null;
	}

	/**
	 * Returns the result of interpreting the object as an instance of 'Text To Speech Text'.
	 * 
	 * 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 'Text To Speech Text'.
	 * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
	 * @generated
	 */
	public T caseTextToSpeechText(TextToSpeechText object) {
		return null;
	}

	/**
	 * Returns the result of interpreting the object as an instance of 'Text To Speech Resource'.
	 * 
	 * 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 'Text To Speech Resource'.
	 * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
	 * @generated
	 */
	public T caseTextToSpeechResource(TextToSpeechResource object) {
		return null;
	}

	/**
	 * Returns the result of interpreting the object as an instance of 'Model Element'.
	 * 
	 * 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 'Model Element'.
	 * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
	 * @generated
	 */
	public T caseModelElement(ModelElement object) {
		return null;
	}

	/**
	 * Returns the result of interpreting the object as an instance of 'Element'.
	 * 
	 * 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 'Element'.
	 * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
	 * @generated
	 */
	public T caseHtmlElement(HtmlElement object) {
		return null;
	}

	/**
	 * Returns the result of interpreting the object as an instance of 'Element'.
	 * 
	 * 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 'Element'.
	 * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
	 * @generated
	 */
	public T caseBootstrapElement(BootstrapElement object) {
		return null;
	}

	/**
	 * Returns the result of interpreting the object as an instance of 'Table Configuration'.
	 * 
	 * 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 'Table Configuration'.
	 * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
	 * @generated
	 */
	public T caseTableConfiguration(TableConfiguration 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;
	}

} //ComponentsSwitch




© 2015 - 2025 Weber Informatics LLC | Privacy Policy