Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/infra/filters/org.eclipse.papyrus.infra.filters/src-gen/org/eclipse/papyrus/infra/filters/impl/FiltersFactoryImpl.java')
-rw-r--r--plugins/infra/filters/org.eclipse.papyrus.infra.filters/src-gen/org/eclipse/papyrus/infra/filters/impl/FiltersFactoryImpl.java229
1 files changed, 229 insertions, 0 deletions
diff --git a/plugins/infra/filters/org.eclipse.papyrus.infra.filters/src-gen/org/eclipse/papyrus/infra/filters/impl/FiltersFactoryImpl.java b/plugins/infra/filters/org.eclipse.papyrus.infra.filters/src-gen/org/eclipse/papyrus/infra/filters/impl/FiltersFactoryImpl.java
new file mode 100644
index 00000000000..3a35ee42250
--- /dev/null
+++ b/plugins/infra/filters/org.eclipse.papyrus.infra.filters/src-gen/org/eclipse/papyrus/infra/filters/impl/FiltersFactoryImpl.java
@@ -0,0 +1,229 @@
+/**
+ * Copyright (c) 2014 Christian W. Damus and others.
+ *
+ * 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:
+ * Christian W. Damus - Initial API and implementation
+ */
+package org.eclipse.papyrus.infra.filters.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.infra.filters.*;
+
+/**
+ * <!-- begin-user-doc -->
+ * An implementation of the model <b>Factory</b>.
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+public class FiltersFactoryImpl extends EFactoryImpl implements FiltersFactory
+{
+ /**
+ * Creates the default factory implementation.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public static FiltersFactory init()
+ {
+ try
+ {
+ FiltersFactory theFiltersFactory = (FiltersFactory) EPackage.Registry.INSTANCE.getEFactory(FiltersPackage.eNS_URI);
+ if (theFiltersFactory != null)
+ {
+ return theFiltersFactory;
+ }
+ } catch (Exception exception)
+ {
+ EcorePlugin.INSTANCE.log(exception);
+ }
+ return new FiltersFactoryImpl();
+ }
+
+ /**
+ * Creates an instance of the factory.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public FiltersFactoryImpl()
+ {
+ super();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public EObject create(EClass eClass)
+ {
+ switch (eClass.getClassifierID())
+ {
+ case FiltersPackage.COMPOUND_FILTER:
+ return createCompoundFilter();
+ case FiltersPackage.EQUALS:
+ return createEquals();
+ default:
+ throw new IllegalArgumentException("The class '" + eClass.getName() + "' is not a valid classifier"); //$NON-NLS-1$ //$NON-NLS-2$
+ }
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public Object createFromString(EDataType eDataType, String initialValue)
+ {
+ switch (eDataType.getClassifierID())
+ {
+ case FiltersPackage.OPERATOR_KIND:
+ return createOperatorKindFromString(eDataType, initialValue);
+ case FiltersPackage.OBJECT:
+ return createObjectFromString(eDataType, initialValue);
+ default:
+ throw new IllegalArgumentException("The datatype '" + eDataType.getName() + "' is not a valid classifier"); //$NON-NLS-1$ //$NON-NLS-2$
+ }
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public String convertToString(EDataType eDataType, Object instanceValue)
+ {
+ switch (eDataType.getClassifierID())
+ {
+ case FiltersPackage.OPERATOR_KIND:
+ return convertOperatorKindToString(eDataType, instanceValue);
+ case FiltersPackage.OBJECT:
+ return convertObjectToString(eDataType, instanceValue);
+ default:
+ throw new IllegalArgumentException("The datatype '" + eDataType.getName() + "' is not a valid classifier"); //$NON-NLS-1$ //$NON-NLS-2$
+ }
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public CompoundFilter createCompoundFilter()
+ {
+ CompoundFilterImpl compoundFilter = new CompoundFilterImpl();
+ return compoundFilter;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public Equals createEquals()
+ {
+ EqualsImpl equals = new EqualsImpl();
+ return equals;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public OperatorKind createOperatorKindFromString(EDataType eDataType, String initialValue)
+ {
+ OperatorKind result = OperatorKind.get(initialValue);
+ if (result == null)
+ {
+ throw new IllegalArgumentException("The value '" + initialValue + "' is not a valid enumerator of '" + eDataType.getName() + "'"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+ }
+ return result;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public String convertOperatorKindToString(EDataType eDataType, Object instanceValue)
+ {
+ return instanceValue == null ? null : instanceValue.toString();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public Object createObjectFromString(EDataType eDataType, String initialValue)
+ {
+ return super.createFromString(eDataType, initialValue);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public String convertObjectToString(EDataType eDataType, Object instanceValue)
+ {
+ return super.convertToString(eDataType, instanceValue);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public FiltersPackage getFiltersPackage()
+ {
+ return (FiltersPackage) getEPackage();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @deprecated
+ * @generated
+ */
+ @Deprecated
+ public static FiltersPackage getPackage()
+ {
+ return FiltersPackage.eINSTANCE;
+ }
+
+} // FiltersFactoryImpl

Back to the top