KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > apache > bcel > ExceptionConstants


1 /*
2  * Copyright 2000-2004 The Apache Software Foundation
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  *
16  */

17 package org.apache.bcel;
18
19 /**
20  * Exception constants.
21  *
22  * @version $Id: ExceptionConstants.java 386056 2006-03-15 11:31:56Z tcurdt $
23  * @author E. Haase
24  */

25 public interface ExceptionConstants {
26
27     /** The mother of all exceptions
28      */

29     public static final Class JavaDoc THROWABLE = Throwable JavaDoc.class;
30     /** Super class of any run-time exception
31      */

32     public static final Class JavaDoc RUNTIME_EXCEPTION = RuntimeException JavaDoc.class;
33     /** Super class of any linking exception (aka Linkage Error)
34      */

35     public static final Class JavaDoc LINKING_EXCEPTION = LinkageError JavaDoc.class;
36     /** Linking Exceptions
37      */

38     public static final Class JavaDoc CLASS_CIRCULARITY_ERROR = ClassCircularityError JavaDoc.class;
39     public static final Class JavaDoc CLASS_FORMAT_ERROR = ClassFormatError JavaDoc.class;
40     public static final Class JavaDoc EXCEPTION_IN_INITIALIZER_ERROR = ExceptionInInitializerError JavaDoc.class;
41     public static final Class JavaDoc INCOMPATIBLE_CLASS_CHANGE_ERROR = IncompatibleClassChangeError JavaDoc.class;
42     public static final Class JavaDoc ABSTRACT_METHOD_ERROR = AbstractMethodError JavaDoc.class;
43     public static final Class JavaDoc ILLEGAL_ACCESS_ERROR = IllegalAccessError JavaDoc.class;
44     public static final Class JavaDoc INSTANTIATION_ERROR = InstantiationError JavaDoc.class;
45     public static final Class JavaDoc NO_SUCH_FIELD_ERROR = NoSuchFieldError JavaDoc.class;
46     public static final Class JavaDoc NO_SUCH_METHOD_ERROR = NoSuchMethodError JavaDoc.class;
47     public static final Class JavaDoc NO_CLASS_DEF_FOUND_ERROR = NoClassDefFoundError JavaDoc.class;
48     public static final Class JavaDoc UNSATISFIED_LINK_ERROR = UnsatisfiedLinkError JavaDoc.class;
49     public static final Class JavaDoc VERIFY_ERROR = VerifyError JavaDoc.class;
50     /* UnsupportedClassVersionError is new in JDK 1.2 */
51     //public static final Class UnsupportedClassVersionError = UnsupportedClassVersionError.class;
52
/** Run-Time Exceptions
53      */

54     public static final Class JavaDoc NULL_POINTER_EXCEPTION = NullPointerException JavaDoc.class;
55     public static final Class JavaDoc ARRAY_INDEX_OUT_OF_BOUNDS_EXCEPTION = ArrayIndexOutOfBoundsException JavaDoc.class;
56     public static final Class JavaDoc ARITHMETIC_EXCEPTION = ArithmeticException JavaDoc.class;
57     public static final Class JavaDoc NEGATIVE_ARRAY_SIZE_EXCEPTION = NegativeArraySizeException JavaDoc.class;
58     public static final Class JavaDoc CLASS_CAST_EXCEPTION = ClassCastException JavaDoc.class;
59     public static final Class JavaDoc ILLEGAL_MONITOR_STATE = IllegalMonitorStateException JavaDoc.class;
60     /** Pre-defined exception arrays according to chapters 5.1-5.4 of the Java Virtual
61      * Machine Specification
62      */

63     public static final Class JavaDoc[] EXCS_CLASS_AND_INTERFACE_RESOLUTION = {
64             NO_CLASS_DEF_FOUND_ERROR, CLASS_FORMAT_ERROR, VERIFY_ERROR, ABSTRACT_METHOD_ERROR,
65             EXCEPTION_IN_INITIALIZER_ERROR, ILLEGAL_ACCESS_ERROR
66     }; // Chapter 5.1
67
public static final Class JavaDoc[] EXCS_FIELD_AND_METHOD_RESOLUTION = {
68             NO_SUCH_FIELD_ERROR, ILLEGAL_ACCESS_ERROR, NO_SUCH_METHOD_ERROR
69     }; // Chapter 5.2
70
public static final Class JavaDoc[] EXCS_INTERFACE_METHOD_RESOLUTION = new Class JavaDoc[0]; // Chapter 5.3 (as below)
71
public static final Class JavaDoc[] EXCS_STRING_RESOLUTION = new Class JavaDoc[0];
72     // Chapter 5.4 (no errors but the ones that _always_ could happen! How stupid.)
73
public static final Class JavaDoc[] EXCS_ARRAY_EXCEPTION = {
74             NULL_POINTER_EXCEPTION, ARRAY_INDEX_OUT_OF_BOUNDS_EXCEPTION
75     };
76 }
77
Popular Tags