Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'extraplugins/eastadl/org.eclipse.papyrus.eastadl/src/org/eclipse/papyrus/eastadl/structure/featuremodeling/util/FeaturemodelingSwitch.java')
-rw-r--r--extraplugins/eastadl/org.eclipse.papyrus.eastadl/src/org/eclipse/papyrus/eastadl/structure/featuremodeling/util/FeaturemodelingSwitch.java303
1 files changed, 303 insertions, 0 deletions
diff --git a/extraplugins/eastadl/org.eclipse.papyrus.eastadl/src/org/eclipse/papyrus/eastadl/structure/featuremodeling/util/FeaturemodelingSwitch.java b/extraplugins/eastadl/org.eclipse.papyrus.eastadl/src/org/eclipse/papyrus/eastadl/structure/featuremodeling/util/FeaturemodelingSwitch.java
new file mode 100644
index 00000000000..1090630d641
--- /dev/null
+++ b/extraplugins/eastadl/org.eclipse.papyrus.eastadl/src/org/eclipse/papyrus/eastadl/structure/featuremodeling/util/FeaturemodelingSwitch.java
@@ -0,0 +1,303 @@
+/*****************************************************************************
+ * Copyright (c) 2010 CEA LIST.
+ *
+ *
+ * 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:
+ * Sara TUCCI (CEA LIST) sara.tucci@cea.fr - Initial API and implementation
+ * Chokri MRAIDHA (CEA LIST) chokri.mraidha@cea.fr - Initial API and implementation
+ * David SERVAT (CEA LIST) david.servat@cea.fr - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.eastadl.structure.featuremodeling.util;
+
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.EPackage;
+import org.eclipse.emf.ecore.util.Switch;
+import org.eclipse.papyrus.eastadl.infrastructure.elements.Context;
+import org.eclipse.papyrus.eastadl.infrastructure.elements.EAElement;
+import org.eclipse.papyrus.eastadl.infrastructure.elements.Relationship;
+import org.eclipse.papyrus.eastadl.structure.featuremodeling.BindingTime;
+import org.eclipse.papyrus.eastadl.structure.featuremodeling.Feature;
+import org.eclipse.papyrus.eastadl.structure.featuremodeling.FeatureConstraint;
+import org.eclipse.papyrus.eastadl.structure.featuremodeling.FeatureGroup;
+import org.eclipse.papyrus.eastadl.structure.featuremodeling.FeatureLink;
+import org.eclipse.papyrus.eastadl.structure.featuremodeling.FeatureModel;
+import org.eclipse.papyrus.eastadl.structure.featuremodeling.FeatureTreeNode;
+import org.eclipse.papyrus.eastadl.structure.featuremodeling.FeaturemodelingPackage;
+
+
+/**
+ * <!-- begin-user-doc --> The <b>Switch</b> for the model's inheritance hierarchy. It supports the
+ * call {@link #doSwitch(EObject) doSwitch(object)} to invoke the <code>caseXXX</code> 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.
+ * <!-- end-user-doc -->
+ * @see org.eclipse.papyrus.eastadl.structure.featuremodeling.FeaturemodelingPackage
+ * @generated
+ */
+public class FeaturemodelingSwitch<T> extends Switch<T> {
+
+ /**
+ * The cached model package
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ * @generated
+ */
+ protected static FeaturemodelingPackage modelPackage;
+
+ /**
+ * Creates an instance of the switch.
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ * @generated
+ */
+ public FeaturemodelingSwitch() {
+ if (modelPackage == null) {
+ modelPackage = FeaturemodelingPackage.eINSTANCE;
+ }
+ }
+
+ /**
+ * Checks whether this is a switch for the given package.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @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;
+ }
+
+ /**
+ * Returns the result of interpreting the object as an instance of '<em>Binding Time</em>'. <!--
+ * begin-user-doc --> This implementation returns null; returning a non-null result will
+ * terminate the switch. <!-- end-user-doc -->
+ *
+ * @param object
+ * the target of the switch.
+ * @return the result of interpreting the object as an instance of '<em>Binding Time</em>'.
+ * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+ * @generated
+ */
+ public T caseBindingTime(BindingTime object) {
+ return null;
+ }
+
+ /**
+ * Returns the result of interpreting the object as an instance of '<em>Context</em>'.
+ * <!-- begin-user-doc -->
+ * This implementation returns null;
+ * returning a non-null result will terminate the switch.
+ * <!-- end-user-doc -->
+ * @param object the target of the switch.
+ * @return the result of interpreting the object as an instance of '<em>Context</em>'.
+ * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+ * @generated
+ */
+ public T caseContext(Context object) {
+ return null;
+ }
+
+ /**
+ * Returns the result of interpreting the object as an instance of '<em>Feature</em>'. <!--
+ * begin-user-doc --> This implementation returns null; returning a non-null result will
+ * terminate the switch. <!-- end-user-doc -->
+ *
+ * @param object
+ * the target of the switch.
+ * @return the result of interpreting the object as an instance of '<em>Feature</em>'.
+ * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+ * @generated
+ */
+ public T caseFeature(Feature object) {
+ return null;
+ }
+
+ /**
+ * Returns the result of interpreting the object as an instance of '<em>Feature Constraint</em>'.
+ * <!-- begin-user-doc --> This implementation returns null; returning a non-null result will
+ * terminate the switch. <!-- end-user-doc -->
+ * @param object the target of the switch.
+ * @return the result of interpreting the object as an instance of '<em>Feature Constraint</em>'.
+ * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+ * @generated
+ */
+ public T caseFeatureConstraint(FeatureConstraint object) {
+ return null;
+ }
+
+ /**
+ * Returns the result of interpreting the object as an instance of '<em>Feature Group</em>'.
+ * <!-- begin-user-doc --> This implementation returns null; returning a non-null result will
+ * terminate the switch. <!-- end-user-doc -->
+ * @param object the target of the switch.
+ * @return the result of interpreting the object as an instance of '<em>Feature Group</em>'.
+ * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+ * @generated
+ */
+ public T caseFeatureGroup(FeatureGroup object) {
+ return null;
+ }
+
+ /**
+ * Returns the result of interpreting the object as an instance of '<em>EA Element</em>'.
+ * <!-- begin-user-doc -->
+ * This implementation returns null;
+ * returning a non-null result will terminate the switch.
+ * <!-- end-user-doc -->
+ * @param object the target of the switch.
+ * @return the result of interpreting the object as an instance of '<em>EA Element</em>'.
+ * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+ * @generated
+ */
+ public T caseEAElement(EAElement object) {
+ return null;
+ }
+
+ /**
+ * Returns the result of interpreting the object as an instance of '<em>Feature Link</em>'. <!--
+ * begin-user-doc --> This implementation returns null; returning a non-null result will
+ * terminate the switch. <!-- end-user-doc -->
+ *
+ * @param object
+ * the target of the switch.
+ * @return the result of interpreting the object as an instance of '<em>Feature Link</em>'.
+ * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+ * @generated
+ */
+ public T caseFeatureLink(FeatureLink object) {
+ return null;
+ }
+
+ /**
+ * Returns the result of interpreting the object as an instance of '<em>Feature Model</em>'.
+ * <!-- begin-user-doc --> This implementation returns null; returning a non-null result will
+ * terminate the switch. <!-- end-user-doc -->
+ * @param object the target of the switch.
+ * @return the result of interpreting the object as an instance of '<em>Feature Model</em>'.
+ * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+ * @generated
+ */
+ public T caseFeatureModel(FeatureModel object) {
+ return null;
+ }
+
+ /**
+ * Returns the result of interpreting the object as an instance of '<em>Feature Tree Node</em>'.
+ * <!-- begin-user-doc --> This implementation returns null; returning a non-null result will
+ * terminate the switch. <!-- end-user-doc -->
+ * @param object the target of the switch.
+ * @return the result of interpreting the object as an instance of '<em>Feature Tree Node</em>'.
+ * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+ * @generated
+ */
+ public T caseFeatureTreeNode(FeatureTreeNode object) {
+ return null;
+ }
+
+ /**
+ * Returns the result of interpreting the object as an instance of '<em>Relationship</em>'.
+ * <!-- begin-user-doc -->
+ * This implementation returns null;
+ * returning a non-null result will terminate the switch.
+ * <!-- end-user-doc -->
+ * @param object the target of the switch.
+ * @return the result of interpreting the object as an instance of '<em>Relationship</em>'.
+ * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+ * @generated
+ */
+ public T caseRelationship(Relationship object) {
+ return null;
+ }
+
+ /**
+ * Returns the result of interpreting the object as an instance of '<em>EObject</em>'. <!--
+ * begin-user-doc --> This implementation returns null; returning a non-null result will
+ * terminate the switch, but this is the last case anyway. <!-- end-user-doc -->
+ *
+ * @param object
+ * the target of the switch.
+ * @return the result of interpreting the object as an instance of '<em>EObject</em>'.
+ * @see #doSwitch(org.eclipse.emf.ecore.EObject)
+ * @generated
+ */
+ @Override
+ public T defaultCase(EObject object) {
+ return null;
+ }
+
+ /**
+ * Calls <code>caseXXX</code> for each class of the model until one returns a non null result; it yields that result.
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ * @return the first non-null result returned by a <code>caseXXX</code> call.
+ * @generated
+ */
+ @Override
+ protected T doSwitch(int classifierID, EObject theEObject) {
+ switch (classifierID) {
+ case FeaturemodelingPackage.FEATURE_MODEL: {
+ FeatureModel featureModel = (FeatureModel)theEObject;
+ T result = caseFeatureModel(featureModel);
+ if (result == null) result = caseContext(featureModel);
+ if (result == null) result = caseEAElement(featureModel);
+ if (result == null) result = defaultCase(theEObject);
+ return result;
+ }
+ case FeaturemodelingPackage.FEATURE: {
+ Feature feature = (Feature)theEObject;
+ T result = caseFeature(feature);
+ if (result == null) result = caseFeatureTreeNode(feature);
+ if (result == null) result = caseContext(feature);
+ if (result == null) result = caseEAElement(feature);
+ if (result == null) result = defaultCase(theEObject);
+ return result;
+ }
+ case FeaturemodelingPackage.FEATURE_TREE_NODE: {
+ FeatureTreeNode featureTreeNode = (FeatureTreeNode)theEObject;
+ T result = caseFeatureTreeNode(featureTreeNode);
+ if (result == null) result = caseContext(featureTreeNode);
+ if (result == null) result = caseEAElement(featureTreeNode);
+ if (result == null) result = defaultCase(theEObject);
+ return result;
+ }
+ case FeaturemodelingPackage.BINDING_TIME: {
+ BindingTime bindingTime = (BindingTime)theEObject;
+ T result = caseBindingTime(bindingTime);
+ if (result == null) result = caseEAElement(bindingTime);
+ if (result == null) result = defaultCase(theEObject);
+ return result;
+ }
+ case FeaturemodelingPackage.FEATURE_LINK: {
+ FeatureLink featureLink = (FeatureLink)theEObject;
+ T result = caseFeatureLink(featureLink);
+ if (result == null) result = caseRelationship(featureLink);
+ if (result == null) result = caseEAElement(featureLink);
+ if (result == null) result = defaultCase(theEObject);
+ return result;
+ }
+ case FeaturemodelingPackage.FEATURE_CONSTRAINT: {
+ FeatureConstraint featureConstraint = (FeatureConstraint)theEObject;
+ T result = caseFeatureConstraint(featureConstraint);
+ if (result == null) result = caseEAElement(featureConstraint);
+ if (result == null) result = defaultCase(theEObject);
+ return result;
+ }
+ case FeaturemodelingPackage.FEATURE_GROUP: {
+ FeatureGroup featureGroup = (FeatureGroup)theEObject;
+ T result = caseFeatureGroup(featureGroup);
+ if (result == null) result = caseFeatureTreeNode(featureGroup);
+ if (result == null) result = caseContext(featureGroup);
+ if (result == null) result = caseEAElement(featureGroup);
+ if (result == null) result = defaultCase(theEObject);
+ return result;
+ }
+ default: return defaultCase(theEObject);
+ }
+ }
+
+} // FeaturemodelingSwitch

Back to the top