Package: DelegateStatementEvaluator

DelegateStatementEvaluator

nameinstructionbranchcomplexitylinemethod
DelegateStatementEvaluator()
M: 0 C: 3
100%
M: 0 C: 0
100%
M: 0 C: 1
100%
M: 0 C: 1
100%
M: 0 C: 1
100%
caseANotYetSpecifiedStm(ANotYetSpecifiedStm, Context)
M: 7 C: 60
90%
M: 2 C: 10
83%
M: 2 C: 5
71%
M: 1 C: 11
92%
M: 0 C: 1
100%

Coverage

1: package org.overture.interpreter.eval;
2:
3: import org.overture.ast.analysis.AnalysisException;
4: import org.overture.ast.statements.ANotYetSpecifiedStm;
5: import org.overture.interpreter.runtime.Context;
6: import org.overture.interpreter.runtime.VdmRuntimeError;
7: import org.overture.interpreter.values.Value;
8:
9: public class DelegateStatementEvaluator extends StatementEvaluator
10: {
11:
12:         @Override
13:         public Value caseANotYetSpecifiedStm(ANotYetSpecifiedStm node, Context ctxt)
14:                         throws AnalysisException
15:         {
16:                 Value val = null;
17:
18:                 val = evalDelegatedANotYetSpecified(node, node.getLocation(), 4041, "statement", false, ctxt);
19:•                if (val != null)
20:                 {
21:                         return val;
22:                 }
23:
24:•                if (val == null && node.getLocation().getModule().equals("CPU"))
25:                 {
26:•                        if (ctxt.title.equals("deploy(obj)"))
27:                         {
28:                                 return ctxt.assistantFactory.createACpuClassDefinitionAssistant().deploy(node, ctxt);
29:•                        } else if (ctxt.title.equals("deploy(obj, name)"))
30:                         {
31:                                 return ctxt.assistantFactory.createACpuClassDefinitionAssistant().deploy(node, ctxt);
32:•                        } else if (ctxt.title.equals("setPriority(opname, priority)"))
33:                         {
34:                                 return ctxt.assistantFactory.createACpuClassDefinitionAssistant().setPriority(node, ctxt);
35:                         }
36:                 }
37:
38:                 return VdmRuntimeError.abort(node.getLocation(), 4041, "'is not yet specified' statement reached", ctxt);
39:         }
40: }