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 [StateSensorToTimeDeltaPieFactory.java]

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

COVERAGE BREAKDOWN BY CLASS AND METHOD

nameclass, %method, %block, %line, %
     
class StateSensorToTimeDeltaPieFactory100% (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)
StateSensorToTimeDeltaPieFactory (): 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.AbstractPie;
4import de.uka.ipd.sdq.codegen.simudatavisualisation.datatypes.TimeDeltaPie;
5import de.uka.ipd.sdq.sensorframework.entities.SensorAndMeasurements;
6import de.uka.ipd.sdq.sensorframework.entities.StateSensor;
7 
8public class StateSensorToTimeDeltaPieFactory implements IAdapterFactory {
9 
10        public boolean canAdapt(Object adaptee, Class<?> targetClass) {
11                if (adaptee instanceof SensorAndMeasurements) {
12                        SensorAndMeasurements sam = (SensorAndMeasurements) adaptee;
13                        if (sam.getSensor() instanceof StateSensor) {
14                                if (TimeDeltaPie.class == targetClass) {
15                                        return true;
16                                }
17                        }
18                }
19                return false;
20        }
21 
22        public DataAdapter getAdapter(Object adaptee) {
23                return new StateSensorToTimeDeltaPieAdapter(
24                                (SensorAndMeasurements) adaptee);
25        }
26 
27        public String getMetricLabel() {
28                return "Utilisation";
29        }
30 
31        public String getAdapterFactoryID() {
32                return "StateSensorToTimeDeltaPieFactory";
33        }
34 
35        public boolean createsAdaptersFor(Class<?> targetClass) {
36                return targetClass.isAssignableFrom(TimeDeltaPie.class);
37        }
38 
39}

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