EMMA Coverage Report (generated Fri Jul 28 01:51:09 CEST 2006)
[all classes][org.jtiger.assertion]

COVERAGE SUMMARY FOR SOURCE FILE [BoxedTypePromoterFactory.java]

nameclass, %method, %block, %line, %
BoxedTypePromoterFactory.java100% (2/2)100% (4/4)100% (71/71)100% (18/18)

COVERAGE BREAKDOWN BY CLASS AND METHOD

nameclass, %method, %block, %line, %
     
class BoxedTypePromoterFactory100% (1/1)100% (2/2)100% (7/7)100% (3/3)
BoxedTypePromoterFactory (): void 100% (1/1)100% (3/3)100% (2/2)
newBoxedTypePromoter (): BoxedTypePromoter 100% (1/1)100% (4/4)100% (1/1)
     
class BoxedTypePromoterFactory$BoxedTypePromoterImpl100% (1/1)100% (2/2)100% (64/64)100% (15/15)
BoxedTypePromoterFactory$BoxedTypePromoterImpl (): void 100% (1/1)100% (3/3)100% (2/2)
promote (Object): Object 100% (1/1)100% (61/61)100% (13/13)

1/*
2 * JTiger Unit Testing Framework for J2SE 1.5
3 * Copyright (C) 2005 Tony Morris
4 *
5 * This software is licenced under the
6 * Common Public Licence version 1.0
7 * http://www.opensource.org/licenses/cpl1.0.php
8 *
9 * You received a copy of this licence with this software.
10 */
11package org.jtiger.assertion;
12 
13final class BoxedTypePromoterFactory
14{
15    private BoxedTypePromoterFactory()
16    {
17 
18    }
19 
20    public static BoxedTypePromoter newBoxedTypePromoter()
21    {
22        return new BoxedTypePromoterImpl();
23    }
24 
25    private static final class BoxedTypePromoterImpl implements BoxedTypePromoter
26    {
27        BoxedTypePromoterImpl()
28        {
29 
30        }
31 
32        public Object promote(final Object o)
33        {
34            if(o == null)
35            {
36                return null;
37            }
38            else if(o instanceof Byte)
39            {
40                return new Long(((Byte)o).byteValue());
41            }
42            else if(o instanceof Short)
43            {
44                return new Long(((Short)o).shortValue());
45            }
46            else if(o instanceof Character)
47            {
48                return new Long(((Character)o).charValue());
49            }
50            else if(o instanceof Integer)
51            {
52                return new Long(((Integer)o).intValue());
53            }
54            else if(o instanceof Float)
55            {
56                return new Double(((Float)o).floatValue());
57            }
58            else
59            {
60                return o;
61            }
62        }
63    }
64}

[all classes][org.jtiger.assertion]
EMMA 2.0.5312 (C) Vladimir Roubtsov