EMMA Coverage Report (generated Thu Jan 20 11:39:44 EST 2011)
[all classes][com.hammurapi.convert]

COVERAGE SUMMARY FOR SOURCE FILE [SingletonConverterPart.java]

nameclass, %method, %block, %line, %
SingletonConverterPart.java100% (1/1)100% (2/2)93%  (25/27)88%  (7/8)

COVERAGE BREAKDOWN BY CLASS AND METHOD

nameclass, %method, %block, %line, %
     
class SingletonConverterPart100% (1/1)100% (2/2)93%  (25/27)88%  (7/8)
convert (Object, Class, Context, Converter): Object 100% (1/1)92%  (22/24)86%  (6/7)
SingletonConverterPart (): void 100% (1/1)100% (3/3)100% (1/1)

1package com.hammurapi.convert;
2 
3import java.util.Iterator;
4import java.util.concurrent.Callable;
5 
6import com.hammurapi.common.Context;
7 
8public class SingletonConverterPart implements ConverterPart {
9 
10        @Override
11        public <S, T> T convert(S source, Class<T> targetType, Context context, Converter master) throws ConversionException {
12                if (source instanceof Iterable) {
13                        Iterator it = ((Iterable) source).iterator();
14                        if (it.hasNext()) {
15                                Object value = it.next();
16                                if (!it.hasNext()) {
17                                        return master.convert(value, targetType, context);
18                                }
19                        }
20                }
21                return null;
22        }
23 
24}

[all classes][com.hammurapi.convert]
EMMA 2.0.5312 EclEmma Fix 2 (C) Vladimir Roubtsov