EMMA Coverage Report (generated Sun Feb 05 10:43:15 CET 2012)
[all classes][de.uka.ipd.sdq.simucomframework.probes]

COVERAGE SUMMARY FOR SOURCE FILE [TakeExecutionResultStrategy.java]

nameclass, %method, %block, %line, %
TakeExecutionResultStrategy.java0%   (0/1)0%   (0/2)0%   (0/48)0%   (0/11)

COVERAGE BREAKDOWN BY CLASS AND METHOD

nameclass, %method, %block, %line, %
     
class TakeExecutionResultStrategy0%   (0/1)0%   (0/2)0%   (0/48)0%   (0/11)
TakeExecutionResultStrategy (): void 0%   (0/1)0%   (0/3)0%   (0/1)
takeSample (String, Object []): ProbeSample 0%   (0/1)0%   (0/45)0%   (0/10)

1package de.uka.ipd.sdq.simucomframework.probes;
2 
3import javax.measure.Measure;
4import javax.measure.quantity.Dimensionless;
5 
6import de.uka.ipd.sdq.probespec.framework.ProbeSample;
7import de.uka.ipd.sdq.probespec.framework.ProbeType;
8import de.uka.ipd.sdq.probespec.framework.probes.IProbeStrategy;
9 
10/**
11 * ProbeStrategy which is able to measure the type of an execution result.
12 *
13 * The execution result type is identified through its numeric ID.
14 *
15 * @author brosch
16 *
17 */
18public class TakeExecutionResultStrategy implements IProbeStrategy {
19 
20        /*
21         * (non-Javadoc)
22         *
23         * @see
24         * de.uka.ipd.sdq.probespec.framework.probes.IProbeStrategy#takeSample(java
25         * .lang.String, java.lang.Object[])
26         */
27        public ProbeSample<Integer, Dimensionless> takeSample(String probeId,
28                        Object... o) {
29                Integer stateId = null;
30                if (o.length >= 1 && o[0] instanceof Integer) {
31                        stateId = (Integer) o[0];
32                } else {
33                        throw new IllegalArgumentException("Expected an argument of type "
34                                        + Integer.class.getSimpleName() + ".");
35                }
36                Measure<Integer, Dimensionless> stateMeasure = Measure.valueOf(stateId,
37                                Dimensionless.UNIT);
38                ProbeSample<Integer, Dimensionless> sample = new ProbeSample<Integer, Dimensionless>(
39                                stateMeasure, probeId, ProbeType.EXECUTION_RESULT);
40                return sample;
41        }
42}

[all classes][de.uka.ipd.sdq.simucomframework.probes]
EMMA 2.0.9414 (unsupported private build) (C) Vladimir Roubtsov