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

org.nasdanika.html.model.app.util.AppSwitch Maven / Gradle / Ivy

There is a newer version: 2024.8.0
Show newest version
/**
 */
package org.nasdanika.html.model.app.util;

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

import org.eclipse.emf.ecore.util.Switch;
import org.nasdanika.common.Adaptable;
import org.nasdanika.html.model.app.*;
import org.nasdanika.html.model.bootstrap.BootstrapElement;
import org.nasdanika.html.model.bootstrap.Item;
import org.nasdanika.html.model.html.HtmlElement;
import org.nasdanika.ncore.Marked;
import org.nasdanika.ncore.ModelElement;
import org.nasdanika.ncore.Reference;

/**
 * 
 * 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.app.AppPackage
 * @generated
 */
public class AppSwitch extends Switch {
	/**
	 * The cached model package
	 * 
	 * 
	 * @generated
	 */
	protected static AppPackage modelPackage;

	/**
	 * Creates an instance of the switch.
	 * 
	 * 
	 * @generated
	 */
	public AppSwitch() {
		if (modelPackage == null) {
			modelPackage = AppPackage.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 T1 doSwitch(int classifierID, EObject theEObject) {
		switch (classifierID) {
			case AppPackage.LABEL: {
				Label label = (Label)theEObject;
				T1 result = caseLabel(label);
				if (result == null) result = caseBootstrapElement(label);
				if (result == null) result = caseItem(label);
				if (result == null) result = caseHtmlElement(label);
				if (result == null) result = caseModelElement(label);
				if (result == null) result = caseMarked(label);
				if (result == null) result = caseAdaptable(label);
				if (result == null) result = caseIMarked(label);
				if (result == null) result = defaultCase(theEObject);
				return result;
			}
			case AppPackage.LINK: {
				Link link = (Link)theEObject;
				T1 result = caseLink(link);
				if (result == null) result = caseLabel(link);
				if (result == null) result = caseBootstrapElement(link);
				if (result == null) result = caseItem(link);
				if (result == null) result = caseHtmlElement(link);
				if (result == null) result = caseModelElement(link);
				if (result == null) result = caseMarked(link);
				if (result == null) result = caseAdaptable(link);
				if (result == null) result = caseIMarked(link);
				if (result == null) result = defaultCase(theEObject);
				return result;
			}
			case AppPackage.PAGE: {
				Page page = (Page)theEObject;
				T1 result = casePage(page);
				if (result == null) result = caseBootstrapElement(page);
				if (result == null) result = caseHtmlElement(page);
				if (result == null) result = caseModelElement(page);
				if (result == null) result = caseMarked(page);
				if (result == null) result = caseAdaptable(page);
				if (result == null) result = caseIMarked(page);
				if (result == null) result = defaultCase(theEObject);
				return result;
			}
			case AppPackage.PAGE_PART: {
				PagePart pagePart = (PagePart)theEObject;
				T1 result = casePagePart(pagePart);
				if (result == null) result = caseBootstrapElement(pagePart);
				if (result == null) result = caseHtmlElement(pagePart);
				if (result == null) result = caseModelElement(pagePart);
				if (result == null) result = caseMarked(pagePart);
				if (result == null) result = caseAdaptable(pagePart);
				if (result == null) result = caseIMarked(pagePart);
				if (result == null) result = defaultCase(theEObject);
				return result;
			}
			case AppPackage.HEADER: {
				Header header = (Header)theEObject;
				T1 result = caseHeader(header);
				if (result == null) result = casePagePart(header);
				if (result == null) result = caseBootstrapElement(header);
				if (result == null) result = caseHtmlElement(header);
				if (result == null) result = caseModelElement(header);
				if (result == null) result = caseMarked(header);
				if (result == null) result = caseAdaptable(header);
				if (result == null) result = caseIMarked(header);
				if (result == null) result = defaultCase(theEObject);
				return result;
			}
			case AppPackage.NAVIGATION_BAR: {
				NavigationBar navigationBar = (NavigationBar)theEObject;
				T1 result = caseNavigationBar(navigationBar);
				if (result == null) result = casePagePart(navigationBar);
				if (result == null) result = caseBootstrapElement(navigationBar);
				if (result == null) result = caseHtmlElement(navigationBar);
				if (result == null) result = caseModelElement(navigationBar);
				if (result == null) result = caseMarked(navigationBar);
				if (result == null) result = caseAdaptable(navigationBar);
				if (result == null) result = caseIMarked(navigationBar);
				if (result == null) result = defaultCase(theEObject);
				return result;
			}
			case AppPackage.NAVIGATION_PANEL: {
				NavigationPanel navigationPanel = (NavigationPanel)theEObject;
				T1 result = caseNavigationPanel(navigationPanel);
				if (result == null) result = casePagePart(navigationPanel);
				if (result == null) result = caseBootstrapElement(navigationPanel);
				if (result == null) result = caseHtmlElement(navigationPanel);
				if (result == null) result = caseModelElement(navigationPanel);
				if (result == null) result = caseMarked(navigationPanel);
				if (result == null) result = caseAdaptable(navigationPanel);
				if (result == null) result = caseIMarked(navigationPanel);
				if (result == null) result = defaultCase(theEObject);
				return result;
			}
			case AppPackage.CONTENT_PANEL: {
				ContentPanel contentPanel = (ContentPanel)theEObject;
				T1 result = caseContentPanel(contentPanel);
				if (result == null) result = casePagePart(contentPanel);
				if (result == null) result = caseBootstrapElement(contentPanel);
				if (result == null) result = caseHtmlElement(contentPanel);
				if (result == null) result = caseModelElement(contentPanel);
				if (result == null) result = caseMarked(contentPanel);
				if (result == null) result = caseAdaptable(contentPanel);
				if (result == null) result = caseIMarked(contentPanel);
				if (result == null) result = defaultCase(theEObject);
				return result;
			}
			case AppPackage.FOOTER: {
				Footer footer = (Footer)theEObject;
				T1 result = caseFooter(footer);
				if (result == null) result = casePagePart(footer);
				if (result == null) result = caseBootstrapElement(footer);
				if (result == null) result = caseHtmlElement(footer);
				if (result == null) result = caseModelElement(footer);
				if (result == null) result = caseMarked(footer);
				if (result == null) result = caseAdaptable(footer);
				if (result == null) result = caseIMarked(footer);
				if (result == null) result = defaultCase(theEObject);
				return result;
			}
			case AppPackage.ACTION: {
				Action action = (Action)theEObject;
				T1 result = caseAction(action);
				if (result == null) result = caseLink(action);
				if (result == null) result = caseLabel(action);
				if (result == null) result = caseBootstrapElement(action);
				if (result == null) result = caseItem(action);
				if (result == null) result = caseHtmlElement(action);
				if (result == null) result = caseModelElement(action);
				if (result == null) result = caseMarked(action);
				if (result == null) result = caseAdaptable(action);
				if (result == null) result = caseIMarked(action);
				if (result == null) result = defaultCase(theEObject);
				return result;
			}
			case AppPackage.ACTION_REFERENCE: {
				ActionReference actionReference = (ActionReference)theEObject;
				T1 result = caseActionReference(actionReference);
				if (result == null) result = caseReference(actionReference);
				if (result == null) result = defaultCase(theEObject);
				return result;
			}
			default: return defaultCase(theEObject);
		}
	}

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

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

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

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

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

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

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

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

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

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

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

	/**
	 * Returns the result of interpreting the object as an instance of 'IMarked'.
	 * 
	 * 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 'IMarked'.
	 * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
	 * @generated
	 */
	public T1 caseIMarked(org.nasdanika.persistence.Marked object) {
		return null;
	}

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

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

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

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

} //AppSwitch




© 2015 - 2024 Weber Informatics LLC | Privacy Policy