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

COVERAGE SUMMARY FOR SOURCE FILE [ExampleTakeStoExStrategy.java]

nameclass, %method, %block, %line, %
ExampleTakeStoExStrategy.java0%   (0/1)0%   (0/2)0%   (0/44)0%   (0/11)

COVERAGE BREAKDOWN BY CLASS AND METHOD

nameclass, %method, %block, %line, %
     
class ExampleTakeStoExStrategy0%   (0/1)0%   (0/2)0%   (0/44)0%   (0/11)
ExampleTakeStoExStrategy (): void 0%   (0/1)0%   (0/3)0%   (0/1)
takeSample (String, Object []): ProbeSample 0%   (0/1)0%   (0/41)0%   (0/10)

1package de.uka.ipd.sdq.probespec.framework.probes.example;
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 
10public class ExampleTakeStoExStrategy implements IProbeStrategy {
11 
12        /**
13         * @param o
14         *            expects a {@link SimpleStoEx}
15         */
16        @Override
17        public ProbeSample<Double, Dimensionless> takeSample(String probeId,
18                        Object... o) {
19                SimpleStoEx ex = null;
20                if (o[0] instanceof SimpleStoEx) {
21                        ex = (SimpleStoEx) o[0];
22                } else {
23                        throw new IllegalArgumentException("Expected an argument of type "
24                                        + SimpleStoEx.class.getSimpleName() + ".");
25                }
26 
27                Measure<Double, Dimensionless> evalEx = Measure.valueOf(ex
28                                .evaluateExpression(), Dimensionless.UNIT);
29                ProbeSample<Double, Dimensionless> sample = new ProbeSample<Double, Dimensionless>(
30                                evalEx, probeId, ProbeType.STOEX);
31 
32                return sample;
33        }
34 
35}

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