EMMA Coverage Report (generated Wed Aug 29 00:03:59 CDT 2007)
[all classes][org.fuwjax.jon]

COVERAGE SUMMARY FOR SOURCE FILE [ObjectAccessException.java]

nameclass, %method, %block, %line, %
ObjectAccessException.java100% (2/2)75%  (6/8)94%  (151/160)100% (18.9/19)

COVERAGE BREAKDOWN BY CLASS AND METHOD

nameclass, %method, %block, %line, %
     
class ObjectAccessException$Message100% (1/1)67%  (4/6)94%  (142/151)100% (14.9/15)
valueOf (String): ObjectAccessException$Message 0%   (0/1)0%   (0/5)0%   (0/1)
values (): ObjectAccessException$Message [] 0%   (0/1)0%   (0/4)0%   (0/1)
<static initializer> 100% (1/1)100% (124/124)100% (13/13)
ObjectAccessException$Message (String, int): void 100% (1/1)100% (5/5)100% (1/1)
exception (): ObjectAccessException 100% (1/1)100% (6/6)100% (1/1)
exception (Throwable): ObjectAccessException 100% (1/1)100% (7/7)100% (1/1)
     
class ObjectAccessException100% (1/1)100% (2/2)100% (9/9)100% (4/4)
ObjectAccessException (String): void 100% (1/1)100% (4/4)100% (2/2)
ObjectAccessException (String, Throwable): void 100% (1/1)100% (5/5)100% (2/2)

1/*
2 * This file is part of JON.
3 *
4 * JON is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU Lesser General Public License as published by
6 * the Free Software Foundation; either version 3 of the License, or
7 * (at your option) any later version.
8 *
9 * JON is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
12 * GNU Lesser General Public License for more details.
13 *
14 * You should have received a copy of the GNU Lesser General Public License
15 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
16 * 
17 * Copyright 2007 Michael Doberenz
18 */
19package org.fuwjax.jon;
20 
21/**
22 * Indicates that an object relationship could not be followed or maintained.
23 * @author michaeldoberenz
24 */
25public class ObjectAccessException extends Exception{
26        private static final long serialVersionUID = 1L;
27 
28        /**
29         * The set of possible exception messages for this exception.
30         * @author michaeldoberenz
31         */
32        public enum Message{
33                /**
34                 * Indicates that a null type was used to access a non-null object.
35                 */
36                NonNullNotInstanceOfNullType,
37                /**
38                 * Indicates that an object of an incompatible type was used to access a
39                 * field.
40                 */
41                ObjectNotInstanceOfType,
42                /**
43                 * Indicates that a field is not marked accessible and could not be read
44                 * or modified.
45                 */
46                FieldInaccessible,
47                /**
48                 * Indicates that a literal could not be converted back to a primitive.
49                 */
50                PrimitiveParseFailure,
51                /**
52                 * Indicates that an instance could not be created with
53                 * Class.newInstance().
54                 */
55                NaiveCreationFailed,
56                /**
57                 * Indicates that a requested field does not exist on the class.
58                 */
59                FieldNotFound,
60                /**
61                 * Indicates that an object could not be allocated by the instantiator.
62                 */
63                ObjectNotAllocated,
64                /**
65                 * Indicates that a constructor was not accessible and could not be used
66                 * by the instantiator.
67                 */
68                ConstructorInaccessible,
69                /**
70                 * Indicates that a factory method was not accessible and could not be
71                 * used to retrieve or create an object instance.
72                 */
73                MethodInaccessible,
74                /**
75                 * Indicates that a factory method failed for one of any number of
76                 * reasons.
77                 */
78                MethodFailure,
79                /**
80                 * Indicates that a literal could not be mapped to a known value.
81                 */
82                InvalidLiteral,
83                /**
84                 * Indicates that a class could not be found from its name.
85                 */
86                ClassNotFound;
87                /**
88                 * Returns an exception of this subtype.
89                 * @return an {@link ObjectAccessException}
90                 */
91                public ObjectAccessException exception(){
92                        return new ObjectAccessException(name());
93                }
94 
95                /**
96                 * Returns an exception of this subtype.
97                 * @param cause the cause of this exception
98                 * @return an {@link ObjectAccessException}
99                 */
100                public ObjectAccessException exception(final Throwable cause){
101                        return new ObjectAccessException(name(), cause);
102                }
103        }
104 
105        /**
106         * Creates a new instance with a message <code>message</code>.
107         * @param message a description of the cause of this exception
108         * @param cause the cause of this exception
109         */
110        public ObjectAccessException(final String message, final Throwable cause){
111                super(message, cause);
112        }
113 
114        /**
115         * Creates a new instance with a message <code>message</code>.
116         * @param message a description of the cause of this exception
117         */
118        public ObjectAccessException(final String message){
119                super(message);
120        }
121}

[all classes][org.fuwjax.jon]
EMMA 2.0.5312 (C) Vladimir Roubtsov