EMMA Coverage Report (generated Mon Nov 29 14:43:38 PST 2010)
[all classes][com.jeantessier.classreader.impl]

COVERAGE SUMMARY FOR SOURCE FILE [ElementValueType.java]

nameclass, %method, %block, %line, %
ElementValueType.java100% (14/14)97%  (32/33)99%  (364/369)100% (36/36)

COVERAGE BREAKDOWN BY CLASS AND METHOD

nameclass, %method, %block, %line, %
     
class ElementValueType100% (1/1)86%  (6/7)98%  (195/200)100% (23/23)
valueOf (String): ElementValueType 0%   (0/1)0%   (0/5)0%   (0/1)
<static initializer> 100% (1/1)100% (147/147)100% (14/14)
ElementValueType (String, int, ElementValueType): void 100% (1/1)100% (8/8)100% (3/3)
ElementValueType (String, int, ElementValueType, ElementValueType$1): void 100% (1/1)100% (6/6)100% (1/1)
forTag (char): ElementValueType 100% (1/1)100% (26/26)100% (5/5)
getTag (): char 100% (1/1)100% (4/4)100% (1/1)
values (): ElementValueType [] 100% (1/1)100% (4/4)100% (1/1)
     
class ElementValueType$1100% (1/1)100% (2/2)100% (13/13)100% (2/2)
ElementValueType$1 (String, int, ElementValueType): void 100% (1/1)100% (7/7)100% (1/1)
create (ConstantPool, DataInput): ElementValue 100% (1/1)100% (6/6)100% (1/1)
     
class ElementValueType$10100% (1/1)100% (2/2)100% (13/13)100% (2/2)
ElementValueType$10 (String, int, ElementValueType): void 100% (1/1)100% (7/7)100% (1/1)
create (ConstantPool, DataInput): ElementValue 100% (1/1)100% (6/6)100% (1/1)
     
class ElementValueType$11100% (1/1)100% (2/2)100% (13/13)100% (2/2)
ElementValueType$11 (String, int, ElementValueType): void 100% (1/1)100% (7/7)100% (1/1)
create (ConstantPool, DataInput): ElementValue 100% (1/1)100% (6/6)100% (1/1)
     
class ElementValueType$12100% (1/1)100% (2/2)100% (13/13)100% (2/2)
ElementValueType$12 (String, int, ElementValueType): void 100% (1/1)100% (7/7)100% (1/1)
create (ConstantPool, DataInput): ElementValue 100% (1/1)100% (6/6)100% (1/1)
     
class ElementValueType$13100% (1/1)100% (2/2)100% (13/13)100% (2/2)
ElementValueType$13 (String, int, ElementValueType): void 100% (1/1)100% (7/7)100% (1/1)
create (ConstantPool, DataInput): ElementValue 100% (1/1)100% (6/6)100% (1/1)
     
class ElementValueType$2100% (1/1)100% (2/2)100% (13/13)100% (2/2)
ElementValueType$2 (String, int, ElementValueType): void 100% (1/1)100% (7/7)100% (1/1)
create (ConstantPool, DataInput): ElementValue 100% (1/1)100% (6/6)100% (1/1)
     
class ElementValueType$3100% (1/1)100% (2/2)100% (13/13)100% (2/2)
ElementValueType$3 (String, int, ElementValueType): void 100% (1/1)100% (7/7)100% (1/1)
create (ConstantPool, DataInput): ElementValue 100% (1/1)100% (6/6)100% (1/1)
     
class ElementValueType$4100% (1/1)100% (2/2)100% (13/13)100% (2/2)
ElementValueType$4 (String, int, ElementValueType): void 100% (1/1)100% (7/7)100% (1/1)
create (ConstantPool, DataInput): ElementValue 100% (1/1)100% (6/6)100% (1/1)
     
class ElementValueType$5100% (1/1)100% (2/2)100% (13/13)100% (2/2)
ElementValueType$5 (String, int, ElementValueType): void 100% (1/1)100% (7/7)100% (1/1)
create (ConstantPool, DataInput): ElementValue 100% (1/1)100% (6/6)100% (1/1)
     
class ElementValueType$6100% (1/1)100% (2/2)100% (13/13)100% (2/2)
ElementValueType$6 (String, int, ElementValueType): void 100% (1/1)100% (7/7)100% (1/1)
create (ConstantPool, DataInput): ElementValue 100% (1/1)100% (6/6)100% (1/1)
     
class ElementValueType$7100% (1/1)100% (2/2)100% (13/13)100% (2/2)
ElementValueType$7 (String, int, ElementValueType): void 100% (1/1)100% (7/7)100% (1/1)
create (ConstantPool, DataInput): ElementValue 100% (1/1)100% (6/6)100% (1/1)
     
class ElementValueType$8100% (1/1)100% (2/2)100% (13/13)100% (2/2)
ElementValueType$8 (String, int, ElementValueType): void 100% (1/1)100% (7/7)100% (1/1)
create (ConstantPool, DataInput): ElementValue 100% (1/1)100% (6/6)100% (1/1)
     
class ElementValueType$9100% (1/1)100% (2/2)100% (13/13)100% (2/2)
ElementValueType$9 (String, int, ElementValueType): void 100% (1/1)100% (7/7)100% (1/1)
create (ConstantPool, DataInput): ElementValue 100% (1/1)100% (6/6)100% (1/1)

1/*
2 *  Copyright (c) 2001-2009, Jean Tessier
3 *  All rights reserved.
4 *
5 *  Redistribution and use in source and binary forms, with or without
6 *  modification, are permitted provided that the following conditions
7 *  are met:
8 *
9 *      * Redistributions of source code must retain the above copyright
10 *        notice, this list of conditions and the following disclaimer.
11 *
12 *      * Redistributions in binary form must reproduce the above copyright
13 *        notice, this list of conditions and the following disclaimer in the
14 *        documentation and/or other materials provided with the distribution.
15 *
16 *      * Neither the name of Jean Tessier nor the names of his contributors
17 *        may be used to endorse or promote products derived from this software
18 *        without specific prior written permission.
19 *
20 *  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
21 *  "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
22 *  LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
23 *  A PARTICULAR PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR
24 *  CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
25 *  EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
26 *  PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
27 *  PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
28 *  LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
29 *  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
30 *  SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
31 */
32 
33package com.jeantessier.classreader.impl;
34 
35import java.io.*;
36 
37public enum ElementValueType {
38    BYTE(com.jeantessier.classreader.ElementValueType.BYTE) {
39        public ElementValue create(ConstantPool constantPool, DataInput in) throws IOException {
40            return new ByteConstantElementValue(constantPool, in);
41        }
42    },
43 
44    CHAR(com.jeantessier.classreader.ElementValueType.CHAR) {
45        public ElementValue create(ConstantPool constantPool, DataInput in) throws IOException {
46            return new CharConstantElementValue(constantPool, in);
47        }
48    },
49 
50    DOUBLE(com.jeantessier.classreader.ElementValueType.DOUBLE) {
51        public ElementValue create(ConstantPool constantPool, DataInput in) throws IOException {
52            return new DoubleConstantElementValue(constantPool, in);
53        }
54    },
55 
56    FLOAT(com.jeantessier.classreader.ElementValueType.FLOAT) {
57        public ElementValue create(ConstantPool constantPool, DataInput in) throws IOException {
58            return new FloatConstantElementValue(constantPool, in);
59        }
60    },
61 
62    INTEGER(com.jeantessier.classreader.ElementValueType.INTEGER) {
63        public ElementValue create(ConstantPool constantPool, DataInput in) throws IOException {
64            return new IntegerConstantElementValue(constantPool, in);
65        }
66    },
67 
68    LONG(com.jeantessier.classreader.ElementValueType.LONG) {
69        public ElementValue create(ConstantPool constantPool, DataInput in) throws IOException {
70            return new LongConstantElementValue(constantPool, in);
71        }
72    },
73 
74    SHORT(com.jeantessier.classreader.ElementValueType.SHORT) {
75        public ElementValue create(ConstantPool constantPool, DataInput in) throws IOException {
76            return new ShortConstantElementValue(constantPool, in);
77        }
78    },
79 
80    BOOLEAN(com.jeantessier.classreader.ElementValueType.BOOLEAN) {
81        public ElementValue create(ConstantPool constantPool, DataInput in) throws IOException {
82            return new BooleanConstantElementValue(constantPool, in);
83        }
84    },
85 
86    STRING(com.jeantessier.classreader.ElementValueType.STRING) {
87        public ElementValue create(ConstantPool constantPool, DataInput in) throws IOException {
88            return new StringConstantElementValue(constantPool, in);
89        }
90    },
91 
92    ENUM(com.jeantessier.classreader.ElementValueType.ENUM) {
93        public ElementValue create(ConstantPool constantPool, DataInput in) throws IOException {
94            return new EnumElementValue(constantPool, in);
95        }
96    },
97 
98    CLASS(com.jeantessier.classreader.ElementValueType.CLASS) {
99        public ElementValue create(ConstantPool constantPool, DataInput in) throws IOException {
100            return new ClassElementValue(constantPool, in);
101        }
102    },
103 
104    ANNOTATION(com.jeantessier.classreader.ElementValueType.ANNOTATION) {
105        public ElementValue create(ConstantPool constantPool, DataInput in) throws IOException {
106            return new AnnotationElementValue(constantPool, in);
107        }
108    },
109 
110    ARRAY(com.jeantessier.classreader.ElementValueType.ARRAY) {
111        public ElementValue create(ConstantPool constantPool, DataInput in) throws IOException {
112            return new ArrayElementValue(constantPool, in);
113        }
114    };
115 
116    private final com.jeantessier.classreader.ElementValueType elementValueType;
117 
118    ElementValueType(com.jeantessier.classreader.ElementValueType elementValueType) {
119        this.elementValueType = elementValueType;
120    }
121 
122    public char getTag() {
123        return elementValueType.getTag();
124    }
125 
126    public abstract ElementValue create(ConstantPool constantPool, DataInput in) throws IOException;
127 
128    public static ElementValueType forTag(char tag) {
129        ElementValueType result = null;
130 
131        for (ElementValueType elementValueType : values()) {
132            if (elementValueType.getTag() == tag) {
133                result = elementValueType;
134            }
135        }
136 
137        return result;
138    }
139}

[all classes][com.jeantessier.classreader.impl]
EMMA 2.0.5312 (C) Vladimir Roubtsov