1 /* 2 * reserved comment block 3 * DO NOT REMOVE OR ALTER! 4 */ 5 /* 6 * Licensed to the Apache Software Foundation (ASF) under one or more 7 * contributor license agreements. See the NOTICE file distributed with 8 * this work for additional information regarding copyright ownership. 9 * The ASF licenses this file to You under the Apache License, Version 2.0 10 * (the "License"); you may not use this file except in compliance with 11 * the License. You may obtain a copy of the License at 12 * 13 * http://www.apache.org/licenses/LICENSE-2.0 14 * 15 * Unless required by applicable law or agreed to in writing, software 16 * distributed under the License is distributed on an "AS IS" BASIS, 17 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 18 * See the License for the specific language governing permissions and 19 * limitations under the License. 20 */ 21 22 package com.sun.org.apache.bcel.internal; 23 24 25 /** 26 * Exception constants. 27 * 28 * @author <A HREF="http://www.inf.fu-berlin.de/~ehaase">E. Haase</A> 29 */ 30 public interface ExceptionConstants { 31 /** The mother of all exceptions 32 */ 33 public static final Class THROWABLE = Throwable.class; 34 35 /** Super class of any run-time exception 36 */ 37 public static final Class RUNTIME_EXCEPTION = RuntimeException.class; 38 39 /** Super class of any linking exception (aka Linkage Error) 40 */ 41 public static final Class LINKING_EXCEPTION = LinkageError.class; 42 43 /** Linking Exceptions 44 */ 45 public static final Class CLASS_CIRCULARITY_ERROR = ClassCircularityError.class; 46 public static final Class CLASS_FORMAT_ERROR = ClassFormatError.class; 47 public static final Class EXCEPTION_IN_INITIALIZER_ERROR = ExceptionInInitializerError.class; 48 public static final Class INCOMPATIBLE_CLASS_CHANGE_ERROR = IncompatibleClassChangeError.class; 49 public static final Class ABSTRACT_METHOD_ERROR = AbstractMethodError.class; 50 public static final Class ILLEGAL_ACCESS_ERROR = IllegalAccessError.class; 51 public static final Class INSTANTIATION_ERROR = InstantiationError.class; 52 public static final Class NO_SUCH_FIELD_ERROR = NoSuchFieldError.class; 53 public static final Class NO_SUCH_METHOD_ERROR = NoSuchMethodError.class; 54 public static final Class NO_CLASS_DEF_FOUND_ERROR = NoClassDefFoundError.class; 55 public static final Class UNSATISFIED_LINK_ERROR = UnsatisfiedLinkError.class; 56 public static final Class VERIFY_ERROR = VerifyError.class; 57 58 /* UnsupportedClassVersionError is new in JDK 1.2 */ 59 //public static final Class UnsupportedClassVersionError = UnsupportedClassVersionError.class; 60 61 /** Run-Time Exceptions 62 */ 63 public static final Class NULL_POINTER_EXCEPTION = NullPointerException.class; 64 public static final Class ARRAY_INDEX_OUT_OF_BOUNDS_EXCEPTION = ArrayIndexOutOfBoundsException.class; 65 public static final Class ARITHMETIC_EXCEPTION = ArithmeticException.class; 66 public static final Class NEGATIVE_ARRAY_SIZE_EXCEPTION = NegativeArraySizeException.class; 67 public static final Class CLASS_CAST_EXCEPTION = ClassCastException.class; 68 public static final Class ILLEGAL_MONITOR_STATE = IllegalMonitorStateException.class; 69 70 /** Pre-defined exception arrays according to chapters 5.1-5.4 of the Java Virtual 71 * Machine Specification 72 */ 73 public static final Class[] EXCS_CLASS_AND_INTERFACE_RESOLUTION = { 74 NO_CLASS_DEF_FOUND_ERROR, CLASS_FORMAT_ERROR, VERIFY_ERROR, ABSTRACT_METHOD_ERROR, 75 EXCEPTION_IN_INITIALIZER_ERROR, ILLEGAL_ACCESS_ERROR 76 }; // Chapter 5.1 77 78 public static final Class[] EXCS_FIELD_AND_METHOD_RESOLUTION = { 79 NO_SUCH_FIELD_ERROR, ILLEGAL_ACCESS_ERROR, NO_SUCH_METHOD_ERROR 80 }; // Chapter 5.2 81 82 public static final Class[] EXCS_INTERFACE_METHOD_RESOLUTION = new Class[0]; // Chapter 5.3 (as below) 83 public static final Class[] EXCS_STRING_RESOLUTION = new Class[0]; 84 // Chapter 5.4 (no errors but the ones that _always_ could happen! How stupid.) 85 86 public static final Class[] EXCS_ARRAY_EXCEPTION = { 87 NULL_POINTER_EXCEPTION, ARRAY_INDEX_OUT_OF_BOUNDS_EXCEPTION 88 }; 89 90 }