EMMA Coverage Report (generated Sun Feb 05 10:43:15 CET 2012) |
---|
[all classes][de.uka.ipd.sdq.sensorframework.adapter] |
name | class, % | method, % | block, % | line, % |
---|---|---|---|---|
IdentitySensorAdapterFactory.java | 100% (1/1) | 33% (2/6) | 17% (5/29) | 20% (2/10) |
name | class, % | method, % | block, % | line, % |
---|---|---|---|---|
class IdentitySensorAdapterFactory | 100% (1/1) | 33% (2/6) | 17% (5/29) | 20% (2/10) |
canAdapt (Object, Class): boolean | 0% (0/1) | 0% (0/15) | 0% (0/5) | |
createsAdaptersFor (Class): boolean | 0% (0/1) | 0% (0/2) | 0% (0/1) | |
getAdapter (Object): DataAdapter | 0% (0/1) | 0% (0/5) | 0% (0/1) | |
getMetricLabel (): String | 0% (0/1) | 0% (0/2) | 0% (0/1) | |
IdentitySensorAdapterFactory (): void | 100% (1/1) | 100% (3/3) | 100% (1/1) | |
getAdapterFactoryID (): String | 100% (1/1) | 100% (2/2) | 100% (1/1) |
1 | package de.uka.ipd.sdq.sensorframework.adapter; |
2 | |
3 | import de.uka.ipd.sdq.sensorframework.entities.SensorAndMeasurements; |
4 | |
5 | public class IdentitySensorAdapterFactory implements IAdapterFactory { |
6 | |
7 | public boolean canAdapt(Object adaptee, Class<?> targetClass) { |
8 | if (adaptee instanceof SensorAndMeasurements) { |
9 | SensorAndMeasurements sam = (SensorAndMeasurements) adaptee; |
10 | if (targetClass.isInstance(sam.getSensor())) |
11 | return true; |
12 | } |
13 | return false; |
14 | } |
15 | |
16 | public DataAdapter getAdapter(Object adaptee) { |
17 | return new IdentitySensorAdapter(adaptee); |
18 | } |
19 | |
20 | public String getMetricLabel() { |
21 | return ""; |
22 | } |
23 | |
24 | public String getAdapterFactoryID() { |
25 | return "IdentityAdapterFactory"; |
26 | } |
27 | |
28 | public boolean createsAdaptersFor(Class<?> targetClass) { |
29 | return true; |
30 | } |
31 | |
32 | } |
[all classes][de.uka.ipd.sdq.sensorframework.adapter] |
EMMA 2.0.9414 (unsupported private build) (C) Vladimir Roubtsov |