diff options
Diffstat (limited to 'extraplugins/eastadl/org.eclipse.papyrus.eastadl/src/org/eclipse/papyrus/eastadl/dependability/safetyconstraints/impl/SafetyconstraintsFactoryImpl.java')
-rw-r--r-- | extraplugins/eastadl/org.eclipse.papyrus.eastadl/src/org/eclipse/papyrus/eastadl/dependability/safetyconstraints/impl/SafetyconstraintsFactoryImpl.java | 61 |
1 files changed, 41 insertions, 20 deletions
diff --git a/extraplugins/eastadl/org.eclipse.papyrus.eastadl/src/org/eclipse/papyrus/eastadl/dependability/safetyconstraints/impl/SafetyconstraintsFactoryImpl.java b/extraplugins/eastadl/org.eclipse.papyrus.eastadl/src/org/eclipse/papyrus/eastadl/dependability/safetyconstraints/impl/SafetyconstraintsFactoryImpl.java index e489b1f47ea..8f96927167d 100644 --- a/extraplugins/eastadl/org.eclipse.papyrus.eastadl/src/org/eclipse/papyrus/eastadl/dependability/safetyconstraints/impl/SafetyconstraintsFactoryImpl.java +++ b/extraplugins/eastadl/org.eclipse.papyrus.eastadl/src/org/eclipse/papyrus/eastadl/dependability/safetyconstraints/impl/SafetyconstraintsFactoryImpl.java @@ -1,7 +1,7 @@ /***************************************************************************** * 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 @@ -33,12 +33,14 @@ import org.eclipse.papyrus.eastadl.dependability.safetyconstraints.Safetyconstra * <!-- begin-user-doc --> * An implementation of the model <b>Factory</b>. * <!-- end-user-doc --> + * * @generated */ public class SafetyconstraintsFactoryImpl extends EFactoryImpl implements SafetyconstraintsFactory { /** * <!-- begin-user-doc --> * <!-- end-user-doc --> + * * @deprecated * @generated */ @@ -51,16 +53,16 @@ public class SafetyconstraintsFactoryImpl extends EFactoryImpl implements Safety * Creates the default factory implementation. * <!-- begin-user-doc --> * <!-- end-user-doc --> + * * @generated */ public static SafetyconstraintsFactory init() { try { - SafetyconstraintsFactory theSafetyconstraintsFactory = (SafetyconstraintsFactory)EPackage.Registry.INSTANCE.getEFactory(SafetyconstraintsPackage.eNS_URI); + SafetyconstraintsFactory theSafetyconstraintsFactory = (SafetyconstraintsFactory) EPackage.Registry.INSTANCE.getEFactory(SafetyconstraintsPackage.eNS_URI); if (theSafetyconstraintsFactory != null) { return theSafetyconstraintsFactory; } - } - catch (Exception exception) { + } catch (Exception exception) { EcorePlugin.INSTANCE.log(exception); } return new SafetyconstraintsFactoryImpl(); @@ -70,6 +72,7 @@ public class SafetyconstraintsFactoryImpl extends EFactoryImpl implements Safety * Creates an instance of the factory. * <!-- begin-user-doc --> * <!-- end-user-doc --> + * * @generated */ public SafetyconstraintsFactoryImpl() { @@ -79,39 +82,46 @@ public class SafetyconstraintsFactoryImpl extends EFactoryImpl implements Safety /** * <!-- begin-user-doc --> * <!-- end-user-doc --> + * * @generated */ @Override public String convertToString(EDataType eDataType, Object instanceValue) { switch (eDataType.getClassifierID()) { - case SafetyconstraintsPackage.ASIL_KIND: - return convertASILKindToString(eDataType, instanceValue); - default: - throw new IllegalArgumentException("The datatype '" + eDataType.getName() + "' is not a valid classifier"); + case SafetyconstraintsPackage.ASIL_KIND: + return convertASILKindToString(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 SafetyconstraintsPackage.FAULT_FAILURE: return createFaultFailure(); - case SafetyconstraintsPackage.SAFETY_CONSTRAINT: return createSafetyConstraint(); - case SafetyconstraintsPackage.QUANTITATIVE_SAFETY_CONSTRAINT: return createQuantitativeSafetyConstraint(); - default: - throw new IllegalArgumentException("The class '" + eClass.getName() + "' is not a valid classifier"); + case SafetyconstraintsPackage.FAULT_FAILURE: + return createFaultFailure(); + case SafetyconstraintsPackage.SAFETY_CONSTRAINT: + return createSafetyConstraint(); + case SafetyconstraintsPackage.QUANTITATIVE_SAFETY_CONSTRAINT: + return createQuantitativeSafetyConstraint(); + default: + throw new IllegalArgumentException("The class '" + eClass.getName() + "' is not a valid classifier"); } } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> + * * @generated */ + @Override public FaultFailure createFaultFailure() { FaultFailureImpl faultFailure = new FaultFailureImpl(); return faultFailure; @@ -120,23 +130,26 @@ public class SafetyconstraintsFactoryImpl extends EFactoryImpl implements Safety /** * <!-- begin-user-doc --> * <!-- end-user-doc --> + * * @generated */ @Override public Object createFromString(EDataType eDataType, String initialValue) { switch (eDataType.getClassifierID()) { - case SafetyconstraintsPackage.ASIL_KIND: - return createASILKindFromString(eDataType, initialValue); - default: - throw new IllegalArgumentException("The datatype '" + eDataType.getName() + "' is not a valid classifier"); + case SafetyconstraintsPackage.ASIL_KIND: + return createASILKindFromString(eDataType, initialValue); + default: + throw new IllegalArgumentException("The datatype '" + eDataType.getName() + "' is not a valid classifier"); } } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> + * * @generated */ + @Override public QuantitativeSafetyConstraint createQuantitativeSafetyConstraint() { QuantitativeSafetyConstraintImpl quantitativeSafetyConstraint = new QuantitativeSafetyConstraintImpl(); return quantitativeSafetyConstraint; @@ -145,17 +158,21 @@ public class SafetyconstraintsFactoryImpl extends EFactoryImpl implements Safety /** * <!-- begin-user-doc --> * <!-- end-user-doc --> + * * @generated */ public ASILKind createASILKindFromString(EDataType eDataType, String initialValue) { ASILKind result = ASILKind.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 String convertASILKindToString(EDataType eDataType, Object instanceValue) { @@ -165,8 +182,10 @@ public class SafetyconstraintsFactoryImpl extends EFactoryImpl implements Safety /** * <!-- begin-user-doc --> * <!-- end-user-doc --> + * * @generated */ + @Override public SafetyConstraint createSafetyConstraint() { SafetyConstraintImpl safetyConstraint = new SafetyConstraintImpl(); return safetyConstraint; @@ -175,10 +194,12 @@ public class SafetyconstraintsFactoryImpl extends EFactoryImpl implements Safety /** * <!-- begin-user-doc --> * <!-- end-user-doc --> + * * @generated */ + @Override public SafetyconstraintsPackage getSafetyconstraintsPackage() { - return (SafetyconstraintsPackage)getEPackage(); + return (SafetyconstraintsPackage) getEPackage(); } -} //SafetyconstraintsFactoryImpl +} // SafetyconstraintsFactoryImpl |