Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'extraplugins/eastadl/org.eclipse.papyrus.eastadl/src/org/eclipse/papyrus/eastadl/genericconstraints/impl/GenericconstraintsFactoryImpl.java')
-rw-r--r--extraplugins/eastadl/org.eclipse.papyrus.eastadl/src/org/eclipse/papyrus/eastadl/genericconstraints/impl/GenericconstraintsFactoryImpl.java58
1 files changed, 20 insertions, 38 deletions
diff --git a/extraplugins/eastadl/org.eclipse.papyrus.eastadl/src/org/eclipse/papyrus/eastadl/genericconstraints/impl/GenericconstraintsFactoryImpl.java b/extraplugins/eastadl/org.eclipse.papyrus.eastadl/src/org/eclipse/papyrus/eastadl/genericconstraints/impl/GenericconstraintsFactoryImpl.java
index bd71285c7aa..ffbc7228bc2 100644
--- a/extraplugins/eastadl/org.eclipse.papyrus.eastadl/src/org/eclipse/papyrus/eastadl/genericconstraints/impl/GenericconstraintsFactoryImpl.java
+++ b/extraplugins/eastadl/org.eclipse.papyrus.eastadl/src/org/eclipse/papyrus/eastadl/genericconstraints/impl/GenericconstraintsFactoryImpl.java
@@ -21,7 +21,6 @@ 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.eastadl.genericconstraints.*;
import org.eclipse.papyrus.eastadl.genericconstraints.GenericConstraint;
import org.eclipse.papyrus.eastadl.genericconstraints.GenericConstraintKind;
import org.eclipse.papyrus.eastadl.genericconstraints.GenericConstraintSet;
@@ -34,15 +33,12 @@ import org.eclipse.papyrus.eastadl.genericconstraints.TakeRateConstraint;
* <!-- begin-user-doc -->
* An implementation of the model <b>Factory</b>.
* <!-- end-user-doc -->
- *
* @generated
*/
public class GenericconstraintsFactoryImpl extends EFactoryImpl implements GenericconstraintsFactory {
-
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
* @deprecated
* @generated
*/
@@ -55,16 +51,16 @@ public class GenericconstraintsFactoryImpl extends EFactoryImpl implements Gener
* Creates the default factory implementation.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
* @generated
*/
public static GenericconstraintsFactory init() {
try {
GenericconstraintsFactory theGenericconstraintsFactory = (GenericconstraintsFactory)EPackage.Registry.INSTANCE.getEFactory(GenericconstraintsPackage.eNS_URI);
- if(theGenericconstraintsFactory != null) {
+ if (theGenericconstraintsFactory != null) {
return theGenericconstraintsFactory;
}
- } catch (Exception exception) {
+ }
+ catch (Exception exception) {
EcorePlugin.INSTANCE.log(exception);
}
return new GenericconstraintsFactoryImpl();
@@ -74,7 +70,6 @@ public class GenericconstraintsFactoryImpl extends EFactoryImpl implements Gener
* Creates an instance of the factory.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
* @generated
*/
public GenericconstraintsFactoryImpl() {
@@ -84,7 +79,6 @@ public class GenericconstraintsFactoryImpl extends EFactoryImpl implements Gener
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
* @generated
*/
public String convertGenericConstraintKindToString(EDataType eDataType, Object instanceValue) {
@@ -94,59 +88,52 @@ public class GenericconstraintsFactoryImpl extends EFactoryImpl implements Gener
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
* @generated
*/
@Override
public String convertToString(EDataType eDataType, Object instanceValue) {
- switch(eDataType.getClassifierID()) {
- case GenericconstraintsPackage.GENERIC_CONSTRAINT_KIND:
- return convertGenericConstraintKindToString(eDataType, instanceValue);
- default:
- throw new IllegalArgumentException("The datatype '" + eDataType.getName() + "' is not a valid classifier");
+ switch (eDataType.getClassifierID()) {
+ case GenericconstraintsPackage.GENERIC_CONSTRAINT_KIND:
+ return convertGenericConstraintKindToString(eDataType, instanceValue);
+ default:
+ throw new IllegalArgumentException("The datatype '" + eDataType.getName() + "' is not a valid classifier");
}
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
* @generated
*/
@Override
public EObject create(EClass eClass) {
- switch(eClass.getClassifierID()) {
- case GenericconstraintsPackage.GENERIC_CONSTRAINT:
- return createGenericConstraint();
- case GenericconstraintsPackage.GENERIC_CONSTRAINT_SET:
- return createGenericConstraintSet();
- case GenericconstraintsPackage.TAKE_RATE_CONSTRAINT:
- return createTakeRateConstraint();
- default:
- throw new IllegalArgumentException("The class '" + eClass.getName() + "' is not a valid classifier");
+ switch (eClass.getClassifierID()) {
+ case GenericconstraintsPackage.GENERIC_CONSTRAINT: return createGenericConstraint();
+ case GenericconstraintsPackage.GENERIC_CONSTRAINT_SET: return createGenericConstraintSet();
+ case GenericconstraintsPackage.TAKE_RATE_CONSTRAINT: return createTakeRateConstraint();
+ 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 GenericconstraintsPackage.GENERIC_CONSTRAINT_KIND:
- return createGenericConstraintKindFromString(eDataType, initialValue);
- default:
- throw new IllegalArgumentException("The datatype '" + eDataType.getName() + "' is not a valid classifier");
+ switch (eDataType.getClassifierID()) {
+ case GenericconstraintsPackage.GENERIC_CONSTRAINT_KIND:
+ return createGenericConstraintKindFromString(eDataType, initialValue);
+ default:
+ throw new IllegalArgumentException("The datatype '" + eDataType.getName() + "' is not a valid classifier");
}
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
* @generated
*/
public GenericConstraint createGenericConstraint() {
@@ -157,20 +144,17 @@ public class GenericconstraintsFactoryImpl extends EFactoryImpl implements Gener
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
* @generated
*/
public GenericConstraintKind createGenericConstraintKindFromString(EDataType eDataType, String initialValue) {
GenericConstraintKind result = GenericConstraintKind.get(initialValue);
- if(result == null)
- throw new IllegalArgumentException("The value '" + initialValue + "' is not a valid enumerator of '" + eDataType.getName() + "'");
+ 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 GenericConstraintSet createGenericConstraintSet() {
@@ -181,7 +165,6 @@ public class GenericconstraintsFactoryImpl extends EFactoryImpl implements Gener
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
* @generated
*/
public TakeRateConstraint createTakeRateConstraint() {
@@ -192,7 +175,6 @@ public class GenericconstraintsFactoryImpl extends EFactoryImpl implements Gener
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
* @generated
*/
public GenericconstraintsPackage getGenericconstraintsPackage() {

Back to the top