EMMA Coverage Report (generated Sun Feb 05 10:43:15 CET 2012)
[all classes][de.uka.ipd.sdq.dsexplore.qml.contract.QMLContract.impl]

COVERAGE SUMMARY FOR SOURCE FILE [ConstraintImpl.java]

nameclass, %method, %block, %line, %
ConstraintImpl.java0%   (0/1)0%   (0/3)0%   (0/67)0%   (0/20)

COVERAGE BREAKDOWN BY CLASS AND METHOD

nameclass, %method, %block, %line, %
     
class ConstraintImpl0%   (0/1)0%   (0/3)0%   (0/67)0%   (0/20)
All_ASPECTS_of_CONSTRAINTS_have_RESTRICTIONS (DiagnosticChain, Map): boolean 0%   (0/1)0%   (0/62)0%   (0/17)
ConstraintImpl (): void 0%   (0/1)0%   (0/3)0%   (0/2)
eStaticClass (): EClass 0%   (0/1)0%   (0/2)0%   (0/1)

1/**
2 * <copyright>
3 * </copyright>
4 *
5 * $Id$
6 */
7package de.uka.ipd.sdq.dsexplore.qml.contract.QMLContract.impl;
8 
9import de.uka.ipd.sdq.dsexplore.qml.contract.QMLContract.Constraint;
10import de.uka.ipd.sdq.dsexplore.qml.contract.QMLContract.QMLContractPackage;
11 
12import de.uka.ipd.sdq.dsexplore.qml.contract.QMLContract.util.QMLContractValidator;
13 
14import java.util.Map;
15 
16import org.eclipse.emf.common.util.BasicDiagnostic;
17import org.eclipse.emf.common.util.Diagnostic;
18import org.eclipse.emf.common.util.DiagnosticChain;
19 
20import org.eclipse.emf.ecore.EClass;
21 
22import org.eclipse.emf.ecore.plugin.EcorePlugin;
23 
24import org.eclipse.emf.ecore.util.EObjectValidator;
25 
26import org.eclipse.ocl.ParserException;
27 
28import org.eclipse.ocl.ecore.OCL;
29 
30/**
31 * <!-- begin-user-doc -->
32 * An implementation of the model object '<em><b>Constraint</b></em>'.
33 * <!-- end-user-doc -->
34 * <p>
35 * </p>
36 *
37 * @generated
38 */
39public class ConstraintImpl extends CriterionImpl implements Constraint {
40        /**
41         * <!-- begin-user-doc -->
42         * <!-- end-user-doc -->
43         * @generated
44         */
45        protected ConstraintImpl() {
46                super();
47        }
48 
49        /**
50         * <!-- begin-user-doc -->
51         * <!-- end-user-doc -->
52         * @generated
53         */
54        @Override
55        protected EClass eStaticClass() {
56                return QMLContractPackage.Literals.CONSTRAINT;
57        }
58 
59        /**
60         * The cached OCL expression body for the '{@link #All_ASPECTS_of_CONSTRAINTS_have_RESTRICTIONS(org.eclipse.emf.common.util.DiagnosticChain, java.util.Map) <em>All ASPECTS of CONSTRAINTS have RESTRICTIONS</em>}' operation.
61         * <!-- begin-user-doc -->
62         * <!-- end-user-doc -->
63         * @see #All_ASPECTS_of_CONSTRAINTS_have_RESTRICTIONS(org.eclipse.emf.common.util.DiagnosticChain, java.util.Map)
64         * @generated
65         * @ordered
66         */
67        protected static final String ALL_ASPECTS_OF_CONSTRAINTS_HAVE_RESTRICTIONS__DIAGNOSTIC_CHAIN_MAP__EOCL_EXP = "self.aspects->forAll(a|a.aspectRequirement<>null and a.aspectRequirement.oclIsTypeOf(QMLContract::Restriction))";
68 
69        /**
70         * The cached OCL invariant for the '{@link #All_ASPECTS_of_CONSTRAINTS_have_RESTRICTIONS(org.eclipse.emf.common.util.DiagnosticChain, java.util.Map) <em>All ASPECTS of CONSTRAINTS have RESTRICTIONS</em>}' invariant operation.
71         * <!-- begin-user-doc -->
72         * <!-- end-user-doc -->
73         * @see #All_ASPECTS_of_CONSTRAINTS_have_RESTRICTIONS(org.eclipse.emf.common.util.DiagnosticChain, java.util.Map)
74         * @generated
75         * @ordered
76         */
77        protected static org.eclipse.ocl.ecore.Constraint ALL_ASPECTS_OF_CONSTRAINTS_HAVE_RESTRICTIONS__DIAGNOSTIC_CHAIN_MAP__EOCL_INV;
78 
79        /**
80         * <!-- begin-user-doc -->
81         * <!-- end-user-doc -->
82         * @generated
83         */
84        public boolean All_ASPECTS_of_CONSTRAINTS_have_RESTRICTIONS(DiagnosticChain diagnostics, Map<Object, Object> context) {
85                if (ALL_ASPECTS_OF_CONSTRAINTS_HAVE_RESTRICTIONS__DIAGNOSTIC_CHAIN_MAP__EOCL_INV == null) {
86                        OCL.Helper helper = EOCL_ENV.createOCLHelper();
87                        helper.setContext(QMLContractPackage.Literals.CONSTRAINT);
88                        try {
89                                ALL_ASPECTS_OF_CONSTRAINTS_HAVE_RESTRICTIONS__DIAGNOSTIC_CHAIN_MAP__EOCL_INV = helper.createInvariant(ALL_ASPECTS_OF_CONSTRAINTS_HAVE_RESTRICTIONS__DIAGNOSTIC_CHAIN_MAP__EOCL_EXP);
90                        }
91                        catch (ParserException pe) {
92                                throw new UnsupportedOperationException(pe.getLocalizedMessage());
93                        }
94                }
95                if (!EOCL_ENV.createQuery(ALL_ASPECTS_OF_CONSTRAINTS_HAVE_RESTRICTIONS__DIAGNOSTIC_CHAIN_MAP__EOCL_INV).check(this)) {
96                        if (diagnostics != null) {
97                                diagnostics.add
98                                        (new BasicDiagnostic
99                                                (Diagnostic.ERROR,
100                                                 QMLContractValidator.DIAGNOSTIC_SOURCE,
101                                                 QMLContractValidator.CONSTRAINT__ALL_ASPECTS_OF_CONSTRAINTS_HAVE_RESTRICTIONS,
102                                                 EcorePlugin.INSTANCE.getString("_UI_GenericInvariant_diagnostic", new Object[] { "All_ASPECTS_of_CONSTRAINTS_have_RESTRICTIONS", EObjectValidator.getObjectLabel(this, context) }),
103                                                 new Object [] { this }));
104                        }
105                        return false;
106                }
107                return true;
108        }
109 
110} //ConstraintImpl

[all classes][de.uka.ipd.sdq.dsexplore.qml.contract.QMLContract.impl]
EMMA 2.0.9414 (unsupported private build) (C) Vladimir Roubtsov