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