1
2
3
4
5
6
7
8
9
10
11
12
13
14
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 THROWABLE = Throwable.class;
30 /*** Super class of any run-time exception
31 */
32 public static final Class RUNTIME_EXCEPTION = RuntimeException.class;
33 /*** Super class of any linking exception (aka Linkage Error)
34 */
35 public static final Class LINKING_EXCEPTION = LinkageError.class;
36 /*** Linking Exceptions
37 */
38 public static final Class CLASS_CIRCULARITY_ERROR = ClassCircularityError.class;
39 public static final Class CLASS_FORMAT_ERROR = ClassFormatError.class;
40 public static final Class EXCEPTION_IN_INITIALIZER_ERROR = ExceptionInInitializerError.class;
41 public static final Class INCOMPATIBLE_CLASS_CHANGE_ERROR = IncompatibleClassChangeError.class;
42 public static final Class ABSTRACT_METHOD_ERROR = AbstractMethodError.class;
43 public static final Class ILLEGAL_ACCESS_ERROR = IllegalAccessError.class;
44 public static final Class INSTANTIATION_ERROR = InstantiationError.class;
45 public static final Class NO_SUCH_FIELD_ERROR = NoSuchFieldError.class;
46 public static final Class NO_SUCH_METHOD_ERROR = NoSuchMethodError.class;
47 public static final Class NO_CLASS_DEF_FOUND_ERROR = NoClassDefFoundError.class;
48 public static final Class UNSATISFIED_LINK_ERROR = UnsatisfiedLinkError.class;
49 public static final Class VERIFY_ERROR = VerifyError.class;
50
51
52 /*** Run-Time Exceptions
53 */
54 public static final Class NULL_POINTER_EXCEPTION = NullPointerException.class;
55 public static final Class ARRAY_INDEX_OUT_OF_BOUNDS_EXCEPTION = ArrayIndexOutOfBoundsException.class;
56 public static final Class ARITHMETIC_EXCEPTION = ArithmeticException.class;
57 public static final Class NEGATIVE_ARRAY_SIZE_EXCEPTION = NegativeArraySizeException.class;
58 public static final Class CLASS_CAST_EXCEPTION = ClassCastException.class;
59 public static final Class ILLEGAL_MONITOR_STATE = IllegalMonitorStateException.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[] 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 };
67 public static final Class[] EXCS_FIELD_AND_METHOD_RESOLUTION = {
68 NO_SUCH_FIELD_ERROR, ILLEGAL_ACCESS_ERROR, NO_SUCH_METHOD_ERROR
69 };
70 public static final Class[] EXCS_INTERFACE_METHOD_RESOLUTION = new Class[0];
71 public static final Class[] EXCS_STRING_RESOLUTION = new Class[0];
72
73 public static final Class[] EXCS_ARRAY_EXCEPTION = {
74 NULL_POINTER_EXCEPTION, ARRAY_INDEX_OUT_OF_BOUNDS_EXCEPTION
75 };
76 }