From dbbf707d78c76f4bc001d7df2418bd6ceab12db3 Mon Sep 17 00:00:00 2001 From: OszkarSemerath Date: Sat, 24 Mar 2018 22:08:23 -0400 Subject: example projects added --- .../util/FunctionalarchitectureSwitch.java | 282 +++++++++++++++++++++ 1 file changed, 282 insertions(+) create mode 100644 Domains/Examples/ModelGenExampleFAM_plugin/ecore-gen/functionalarchitecture/util/FunctionalarchitectureSwitch.java (limited to 'Domains/Examples/ModelGenExampleFAM_plugin/ecore-gen/functionalarchitecture/util/FunctionalarchitectureSwitch.java') diff --git a/Domains/Examples/ModelGenExampleFAM_plugin/ecore-gen/functionalarchitecture/util/FunctionalarchitectureSwitch.java b/Domains/Examples/ModelGenExampleFAM_plugin/ecore-gen/functionalarchitecture/util/FunctionalarchitectureSwitch.java new file mode 100644 index 00000000..b481a978 --- /dev/null +++ b/Domains/Examples/ModelGenExampleFAM_plugin/ecore-gen/functionalarchitecture/util/FunctionalarchitectureSwitch.java @@ -0,0 +1,282 @@ +/** + */ +package functionalarchitecture.util; + +import functionalarchitecture.*; +import functionalarchitecture.FunctionalInterface; + +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 functionalarchitecture.FunctionalarchitecturePackage + * @generated + */ +public class FunctionalarchitectureSwitch extends Switch { + /** + * The cached model package + * + * + * @generated + */ + protected static FunctionalarchitecturePackage modelPackage; + + /** + * Creates an instance of the switch. + * + * + * @generated + */ + public FunctionalarchitectureSwitch() { + if (modelPackage == null) { + modelPackage = FunctionalarchitecturePackage.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 FunctionalarchitecturePackage.FUNCTIONAL_ELEMENT: { + FunctionalElement functionalElement = (FunctionalElement)theEObject; + T result = caseFunctionalElement(functionalElement); + if (result == null) result = defaultCase(theEObject); + return result; + } + case FunctionalarchitecturePackage.FUNCTIONAL_ARCHITECTURE_MODEL: { + FunctionalArchitectureModel functionalArchitectureModel = (FunctionalArchitectureModel)theEObject; + T result = caseFunctionalArchitectureModel(functionalArchitectureModel); + if (result == null) result = defaultCase(theEObject); + return result; + } + case FunctionalarchitecturePackage.FUNCTION: { + Function function = (Function)theEObject; + T result = caseFunction(function); + if (result == null) result = caseFunctionalElement(function); + if (result == null) result = defaultCase(theEObject); + return result; + } + case FunctionalarchitecturePackage.FAM_TERMINATOR: { + FAMTerminator famTerminator = (FAMTerminator)theEObject; + T result = caseFAMTerminator(famTerminator); + if (result == null) result = defaultCase(theEObject); + return result; + } + case FunctionalarchitecturePackage.INFORMATION_LINK: { + InformationLink informationLink = (InformationLink)theEObject; + T result = caseInformationLink(informationLink); + if (result == null) result = defaultCase(theEObject); + return result; + } + case FunctionalarchitecturePackage.FUNCTIONAL_INTERFACE: { + FunctionalInterface functionalInterface = (FunctionalInterface)theEObject; + T result = caseFunctionalInterface(functionalInterface); + if (result == null) result = defaultCase(theEObject); + return result; + } + case FunctionalarchitecturePackage.FUNCTIONAL_INPUT: { + FunctionalInput functionalInput = (FunctionalInput)theEObject; + T result = caseFunctionalInput(functionalInput); + if (result == null) result = caseFunctionalData(functionalInput); + if (result == null) result = defaultCase(theEObject); + return result; + } + case FunctionalarchitecturePackage.FUNCTIONAL_OUTPUT: { + FunctionalOutput functionalOutput = (FunctionalOutput)theEObject; + T result = caseFunctionalOutput(functionalOutput); + if (result == null) result = caseFunctionalData(functionalOutput); + if (result == null) result = defaultCase(theEObject); + return result; + } + case FunctionalarchitecturePackage.FUNCTIONAL_DATA: { + FunctionalData functionalData = (FunctionalData)theEObject; + T result = caseFunctionalData(functionalData); + if (result == null) result = defaultCase(theEObject); + return result; + } + default: return defaultCase(theEObject); + } + } + + /** + * Returns the result of interpreting the object as an instance of 'Functional 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 'Functional Element'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseFunctionalElement(FunctionalElement object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'Functional Architecture Model'. + * + * 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 'Functional Architecture Model'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseFunctionalArchitectureModel(FunctionalArchitectureModel object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'Function'. + * + * 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 'Function'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseFunction(Function object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'FAM Terminator'. + * + * 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 'FAM Terminator'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseFAMTerminator(FAMTerminator object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'Information 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 'Information Link'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseInformationLink(InformationLink object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'Functional Interface'. + * + * 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 'Functional Interface'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseFunctionalInterface(FunctionalInterface object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'Functional Input'. + * + * 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 'Functional Input'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseFunctionalInput(FunctionalInput object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'Functional Output'. + * + * 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 'Functional Output'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseFunctionalOutput(FunctionalOutput object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'Functional Data'. + * + * 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 'Functional Data'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseFunctionalData(FunctionalData 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; + } + +} //FunctionalarchitectureSwitch -- cgit v1.2.3-54-g00ecf