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

nameclass, %method, %block, %line, %
TimeSpanSensorToQuantilFactory.java100% (1/1)33%  (2/6)15%  (5/34)20%  (2/10)

COVERAGE BREAKDOWN BY CLASS AND METHOD

nameclass, %method, %block, %line, %
     
class TimeSpanSensorToQuantilFactory100% (1/1)33%  (2/6)15%  (5/34)20%  (2/10)
canAdapt (Object, Class): boolean 0%   (0/1)0%   (0/17)0%   (0/5)
createsAdaptersFor (Class): boolean 0%   (0/1)0%   (0/4)0%   (0/1)
getAdapter (Object): DataAdapter 0%   (0/1)0%   (0/6)0%   (0/1)
getMetricLabel (): String 0%   (0/1)0%   (0/2)0%   (0/1)
TimeSpanSensorToQuantilFactory (): 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.TimeSeries;
4import de.uka.ipd.sdq.sensorframework.entities.SensorAndMeasurements;
5import de.uka.ipd.sdq.sensorframework.entities.TimeSpanSensor;
6 
7public class TimeSpanSensorToQuantilFactory 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 TimeSpanSensor && TimeSeries.class == targetClass)
13                                return true;
14                }
15                return false;
16        }
17 
18        public DataAdapter getAdapter(Object adaptee) {
19                return new TimeSpanToQuantilAdapter((SensorAndMeasurements) adaptee);
20        }
21 
22        public String getMetricLabel() {
23                return "Quantil";
24        }
25 
26        public String getAdapterFactoryID() {
27                return "TimeSpanSensorToQuantilFactory";
28        }
29        
30        public boolean createsAdaptersFor(Class<?> targetClass) {
31                return targetClass.isAssignableFrom(TimeSeries.class);
32        }
33}

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