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

fr.lip6.move.pnml.symmetricnet.finiteEnumerations.util.FiniteEnumerationsSwitch Maven / Gradle / Ivy

/**
 *  Copyright 2009-2016 Université Paris Ouest and Sorbonne Universités,
 * 							Univ. Paris 06 - CNRS UMR 7606 (LIP6)
 *
 *  All rights reserved.   This program and the accompanying materials
 *  are made available under the terms of the Eclipse Public License v1.0
 *  which accompanies this distribution, and is available at
 *  http://www.eclipse.org/legal/epl-v10.html
 *
 *  Project leader / Initial Contributor:
 *    Lom Messan Hillah - 
 *
 *  Contributors:
 *    ${ocontributors} - <$oemails}>
 *
 *  Mailing list:
 *    [email protected]
 */
/**
 * (C) Sorbonne Universités, UPMC Univ Paris 06, UMR CNRS 7606 (LIP6/MoVe)
 * All rights reserved.   This program and the accompanying materials
 * are made available under the terms of the Eclipse Public License v1.0
 * which accompanies this distribution, and is available at
 * http://www.eclipse.org/legal/epl-v10.html
 *  
 *  Contributors: 
 *    Lom HILLAH (LIP6) - Initial models and implementation
 *    Rachid Alahyane (UPMC) - Infrastructure and continuous integration
 *    Bastien Bouzerau (UPMC) - Architecture 
 *    Guillaume Giffo (UPMC) - Code generation refactoring, High-level API
 */
package fr.lip6.move.pnml.symmetricnet.finiteEnumerations.util;

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

import fr.lip6.move.pnml.symmetricnet.finiteEnumerations.FEConstant;
import fr.lip6.move.pnml.symmetricnet.finiteEnumerations.FiniteEnumeration;
import fr.lip6.move.pnml.symmetricnet.finiteEnumerations.FiniteEnumerationsPackage;
import fr.lip6.move.pnml.symmetricnet.terms.BuiltInSort;
import fr.lip6.move.pnml.symmetricnet.terms.OperatorDecl;
import fr.lip6.move.pnml.symmetricnet.terms.Sort;
import fr.lip6.move.pnml.symmetricnet.terms.TermsDeclaration;

/**
 * 
 * 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 fr.lip6.move.pnml.symmetricnet.finiteEnumerations.FiniteEnumerationsPackage
 * @generated
 */
public class FiniteEnumerationsSwitch extends Switch {
	/**
	 * The cached model package
	 * 
	 * 
	 * @generated
	 */
	protected static FiniteEnumerationsPackage modelPackage;

	/**
	 * Creates an instance of the switch.
	 * 
	 * 
	 * @generated
	 */
	public FiniteEnumerationsSwitch() {
		if (modelPackage == null) {
			modelPackage = FiniteEnumerationsPackage.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 FiniteEnumerationsPackage.FINITE_ENUMERATION: {
			FiniteEnumeration finiteEnumeration = (FiniteEnumeration) theEObject;
			T result = caseFiniteEnumeration(finiteEnumeration);
			if (result == null)
				result = caseBuiltInSort(finiteEnumeration);
			if (result == null)
				result = caseSort(finiteEnumeration);
			if (result == null)
				result = defaultCase(theEObject);
			return result;
		}
		case FiniteEnumerationsPackage.FE_CONSTANT: {
			FEConstant feConstant = (FEConstant) theEObject;
			T result = caseFEConstant(feConstant);
			if (result == null)
				result = caseOperatorDecl(feConstant);
			if (result == null)
				result = caseTermsDeclaration(feConstant);
			if (result == null)
				result = defaultCase(theEObject);
			return result;
		}
		default:
			return defaultCase(theEObject);
		}
	}

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

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

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

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

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

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

} //FiniteEnumerationsSwitch




© 2015 - 2025 Weber Informatics LLC | Privacy Policy