Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'deprecated/deprecated-plugins/marte.deprecated/marte/org.eclipse.papyrus.marte.static.profile/src/org/eclipse/papyrus/MARTE/MARTE_Foundations/NFPs/impl/NFPsFactoryImpl.java')
-rw-r--r--deprecated/deprecated-plugins/marte.deprecated/marte/org.eclipse.papyrus.marte.static.profile/src/org/eclipse/papyrus/MARTE/MARTE_Foundations/NFPs/impl/NFPsFactoryImpl.java201
1 files changed, 201 insertions, 0 deletions
diff --git a/deprecated/deprecated-plugins/marte.deprecated/marte/org.eclipse.papyrus.marte.static.profile/src/org/eclipse/papyrus/MARTE/MARTE_Foundations/NFPs/impl/NFPsFactoryImpl.java b/deprecated/deprecated-plugins/marte.deprecated/marte/org.eclipse.papyrus.marte.static.profile/src/org/eclipse/papyrus/MARTE/MARTE_Foundations/NFPs/impl/NFPsFactoryImpl.java
new file mode 100644
index 00000000000..f979d75cd77
--- /dev/null
+++ b/deprecated/deprecated-plugins/marte.deprecated/marte/org.eclipse.papyrus.marte.static.profile/src/org/eclipse/papyrus/MARTE/MARTE_Foundations/NFPs/impl/NFPsFactoryImpl.java
@@ -0,0 +1,201 @@
+/*****************************************************************************
+ * 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:
+ * Chokri MRAIDHA (CEA LIST) chokri.mraidha@cea.fr - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.MARTE.MARTE_Foundations.NFPs.impl;
+
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.EDataType;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.EPackage;
+
+import org.eclipse.emf.ecore.impl.EFactoryImpl;
+
+import org.eclipse.emf.ecore.plugin.EcorePlugin;
+
+import org.eclipse.papyrus.MARTE.MARTE_Foundations.NFPs.*;
+
+/**
+ * <!-- begin-user-doc -->
+ * An implementation of the model <b>Factory</b>.
+ * <!-- end-user-doc -->
+ * @generated
+ */
+public class NFPsFactoryImpl extends EFactoryImpl implements NFPsFactory {
+ /**
+ * Creates the default factory implementation.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public static NFPsFactory init() {
+ try {
+ NFPsFactory theNFPsFactory = (NFPsFactory)EPackage.Registry.INSTANCE.getEFactory("http://www.eclipse.org/papyrus/NFPs/1");
+ if (theNFPsFactory != null) {
+ return theNFPsFactory;
+ }
+ }
+ catch (Exception exception) {
+ EcorePlugin.INSTANCE.log(exception);
+ }
+ return new NFPsFactoryImpl();
+ }
+
+ /**
+ * Creates an instance of the factory.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public NFPsFactoryImpl() {
+ super();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public EObject create(EClass eClass) {
+ switch (eClass.getClassifierID()) {
+ case NFPsPackage.NFP: return createNfp();
+ case NFPsPackage.UNIT: return createUnit();
+ case NFPsPackage.NFP_CONSTRAINT: return createNfpConstraint();
+ case NFPsPackage.NFP_TYPE: return createNfpType();
+ case NFPsPackage.DIMENSION: return createDimension();
+ default:
+ throw new IllegalArgumentException("The class '" + eClass.getName() + "' is not a valid classifier");
+ }
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public Object createFromString(EDataType eDataType, String initialValue) {
+ switch (eDataType.getClassifierID()) {
+ case NFPsPackage.CONSTRAINT_KIND:
+ return createConstraintKindFromString(eDataType, initialValue);
+ default:
+ throw new IllegalArgumentException("The datatype '" + eDataType.getName() + "' is not a valid classifier");
+ }
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public String convertToString(EDataType eDataType, Object instanceValue) {
+ switch (eDataType.getClassifierID()) {
+ case NFPsPackage.CONSTRAINT_KIND:
+ return convertConstraintKindToString(eDataType, instanceValue);
+ default:
+ throw new IllegalArgumentException("The datatype '" + eDataType.getName() + "' is not a valid classifier");
+ }
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public Nfp createNfp() {
+ NfpImpl nfp = new NfpImpl();
+ return nfp;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public Unit createUnit() {
+ UnitImpl unit = new UnitImpl();
+ return unit;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public NfpConstraint createNfpConstraint() {
+ NfpConstraintImpl nfpConstraint = new NfpConstraintImpl();
+ return nfpConstraint;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public NfpType createNfpType() {
+ NfpTypeImpl nfpType = new NfpTypeImpl();
+ return nfpType;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public Dimension createDimension() {
+ DimensionImpl dimension = new DimensionImpl();
+ return dimension;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public ConstraintKind createConstraintKindFromString(EDataType eDataType, String initialValue) {
+ ConstraintKind result = ConstraintKind.get(initialValue);
+ if (result == null) throw new IllegalArgumentException("The value '" + initialValue + "' is not a valid enumerator of '" + eDataType.getName() + "'");
+ return result;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public String convertConstraintKindToString(EDataType eDataType, Object instanceValue) {
+ return instanceValue == null ? null : instanceValue.toString();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public NFPsPackage getNFPsPackage() {
+ return (NFPsPackage)getEPackage();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @deprecated
+ * @generated
+ */
+ @Deprecated
+ public static NFPsPackage getPackage() {
+ return NFPsPackage.eINSTANCE;
+ }
+
+} //NFPsFactoryImpl

Back to the top