001/* 002 * Licensed to the Apache Software Foundation (ASF) under one 003 * or more contributor license agreements. See the NOTICE file 004 * distributed with this work for additional information 005 * regarding copyright ownership. The ASF licenses this file 006 * to you under the Apache License, Version 2.0 (the 007 * "License"); you may not use this file except in compliance 008 * with the License. You may obtain a copy of the License at 009 * 010 * https://www.apache.org/licenses/LICENSE-2.0 011 * 012 * Unless required by applicable law or agreed to in writing, 013 * software distributed under the License is distributed on an 014 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 015 * KIND, either express or implied. See the License for the 016 * specific language governing permissions and limitations 017 * under the License. 018 */ 019package org.apache.bcel; 020 021/** 022 * Exception constants. 023 * 024 * @deprecated (since 6.0) DO NOT USE - use ExceptionConst instead 025 */ 026@Deprecated 027public interface ExceptionConstants { 028 029 /** 030 * The mother of all exceptions 031 */ 032 Class<Throwable> THROWABLE = Throwable.class; 033 /** 034 * Super class of any run-time exception 035 */ 036 Class<RuntimeException> RUNTIME_EXCEPTION = RuntimeException.class; 037 /** 038 * Super class of any linking exception (aka Linkage Error) 039 */ 040 Class<LinkageError> LINKING_EXCEPTION = LinkageError.class; 041 /** 042 * Linking Exceptions 043 */ 044 Class<ClassCircularityError> CLASS_CIRCULARITY_ERROR = ClassCircularityError.class; 045 Class<ClassFormatError> CLASS_FORMAT_ERROR = ClassFormatError.class; 046 Class<ExceptionInInitializerError> EXCEPTION_IN_INITIALIZER_ERROR = ExceptionInInitializerError.class; 047 Class<IncompatibleClassChangeError> INCOMPATIBLE_CLASS_CHANGE_ERROR = IncompatibleClassChangeError.class; 048 Class<AbstractMethodError> ABSTRACT_METHOD_ERROR = AbstractMethodError.class; 049 Class<IllegalAccessError> ILLEGAL_ACCESS_ERROR = IllegalAccessError.class; 050 Class<InstantiationError> INSTANTIATION_ERROR = InstantiationError.class; 051 Class<NoSuchFieldError> NO_SUCH_FIELD_ERROR = NoSuchFieldError.class; 052 Class<NoSuchMethodError> NO_SUCH_METHOD_ERROR = NoSuchMethodError.class; 053 Class<NoClassDefFoundError> NO_CLASS_DEF_FOUND_ERROR = NoClassDefFoundError.class; 054 Class<UnsatisfiedLinkError> UNSATISFIED_LINK_ERROR = UnsatisfiedLinkError.class; 055 Class<VerifyError> VERIFY_ERROR = VerifyError.class; 056 /* UnsupportedClassVersionError is new in JDK 1.2 */ 057// Class UnsupportedClassVersionError = UnsupportedClassVersionError.class; 058 /** 059 * Run-Time Exceptions 060 */ 061 Class<NullPointerException> NULL_POINTER_EXCEPTION = NullPointerException.class; 062 Class<ArrayIndexOutOfBoundsException> ARRAY_INDEX_OUT_OF_BOUNDS_EXCEPTION = ArrayIndexOutOfBoundsException.class; 063 Class<ArithmeticException> ARITHMETIC_EXCEPTION = ArithmeticException.class; 064 Class<NegativeArraySizeException> NEGATIVE_ARRAY_SIZE_EXCEPTION = NegativeArraySizeException.class; 065 Class<ClassCastException> CLASS_CAST_EXCEPTION = ClassCastException.class; 066 Class<IllegalMonitorStateException> ILLEGAL_MONITOR_STATE = IllegalMonitorStateException.class; 067 068 /** 069 * Pre-defined exception arrays according to chapters 5.1-5.4 of the Java Virtual Machine Specification 070 * 071 * @deprecated Do not use these arrays, use the static methods in the ExceptionConst implementation class instead 072 */ 073 @Deprecated 074 Class<?>[] EXCS_CLASS_AND_INTERFACE_RESOLUTION = {NO_CLASS_DEF_FOUND_ERROR, CLASS_FORMAT_ERROR, VERIFY_ERROR, ABSTRACT_METHOD_ERROR, 075 EXCEPTION_IN_INITIALIZER_ERROR, ILLEGAL_ACCESS_ERROR}; // Chapter 5.1 076 @Deprecated 077 Class<?>[] EXCS_FIELD_AND_METHOD_RESOLUTION = {NO_SUCH_FIELD_ERROR, ILLEGAL_ACCESS_ERROR, NO_SUCH_METHOD_ERROR}; // Chapter 5.2 078 079 /** 080 * Empty array. 081 */ 082 @Deprecated 083 Class<?>[] EXCS_INTERFACE_METHOD_RESOLUTION = new Class[0]; // Chapter 5.3 (as below) 084 085 /** 086 * Empty array. 087 */ 088 @Deprecated 089 Class<?>[] EXCS_STRING_RESOLUTION = new Class[0]; 090 // Chapter 5.4 (no errors but the ones that _always_ could happen! How stupid.) 091 @Deprecated 092 Class<?>[] EXCS_ARRAY_EXCEPTION = {NULL_POINTER_EXCEPTION, ARRAY_INDEX_OUT_OF_BOUNDS_EXCEPTION}; 093 094}