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

COVERAGE SUMMARY FOR SOURCE FILE [StateSensorToFrequencyFailurePieFactory.java]

nameclass, %method, %block, %line, %
StateSensorToFrequencyFailurePieFactory.java100% (1/1)33%  (2/6)15%  (5/34)17%  (2/12)

COVERAGE BREAKDOWN BY CLASS AND METHOD

nameclass, %method, %block, %line, %
     
class StateSensorToFrequencyFailurePieFactory100% (1/1)33%  (2/6)15%  (5/34)17%  (2/12)
canAdapt (Object, Class): boolean 0%   (0/1)0%   (0/17)0%   (0/6)
createsAdaptersFor (Class): boolean 0%   (0/1)0%   (0/4)0%   (0/1)
getAdapter (Object): DataAdapter 0%   (0/1)0%   (0/6)0%   (0/2)
getMetricLabel (): String 0%   (0/1)0%   (0/2)0%   (0/1)
StateSensorToFrequencyFailurePieFactory (): void 100% (1/1)100% (3/3)100% (1/1)
getAdapterFactoryID (): String 100% (1/1)100% (2/2)100% (1/1)

1package de.uka.ipd.sdq.sensorframework.adapter;
2 
3import de.uka.ipd.sdq.codegen.simudatavisualisation.datatypes.FrequencyFailurePie;
4import de.uka.ipd.sdq.sensorframework.entities.SensorAndMeasurements;
5import de.uka.ipd.sdq.sensorframework.entities.StateSensor;
6 
7public class StateSensorToFrequencyFailurePieFactory implements IAdapterFactory {
8 
9        public boolean canAdapt(Object adaptee, Class<?> targetClass) {
10                if (adaptee instanceof SensorAndMeasurements) {
11                        SensorAndMeasurements sam = (SensorAndMeasurements) adaptee;
12                        if (sam.getSensor() instanceof StateSensor) {
13                                if (FrequencyFailurePie.class == targetClass) {
14                                        return true;
15                                }
16                        }
17                }
18                return false;
19        }
20 
21        public DataAdapter getAdapter(Object adaptee) {
22                return new StateSensorToFrequencyFailurePieAdapter(
23                                (SensorAndMeasurements) adaptee);
24        }
25 
26        public String getMetricLabel() {
27                return "Execution Result (failures only)";
28        }
29 
30        public String getAdapterFactoryID() {
31                return "StateSensorToFrequencyFailurePieFactory";
32        }
33 
34        public boolean createsAdaptersFor(Class<?> targetClass) {
35                return targetClass.isAssignableFrom(FrequencyFailurePie.class);
36        }
37 
38}

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