    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    /**
    035     * Super class of any run-time exception
    036     */
    037    Class<RuntimeException> RUNTIME_EXCEPTION = RuntimeException.class;
    038
    039    /**
    040     * Super class of any linking exception (aka Linkage Error)
    041     */
    042    Class<LinkageError> LINKING_EXCEPTION = LinkageError.class;
    043
    044    /**
    045     * Linking Exceptions.
    046     */
    047
    048    /** Exception class: ClassCircularityError. */
    049    Class<ClassCircularityError> CLASS_CIRCULARITY_ERROR = ClassCircularityError.class;
    050
    051    /** Exception class: ClassFormatError. */
    052    Class<ClassFormatError> CLASS_FORMAT_ERROR = ClassFormatError.class;
    053
    054    /** Exception class: ExceptionInInitializerError. */
    055    Class<ExceptionInInitializerError> EXCEPTION_IN_INITIALIZER_ERROR = ExceptionInInitializerError.class;
    056
    057    /** Exception class: IncompatibleClassChangeError. */
    058    Class<IncompatibleClassChangeError> INCOMPATIBLE_CLASS_CHANGE_ERROR = IncompatibleClassChangeError.class;
    059
    060    /** Exception class: AbstractMethodError. */
    061    Class<AbstractMethodError> ABSTRACT_METHOD_ERROR = AbstractMethodError.class;
    062
    063    /** Exception class: IllegalAccessError. */
    064    Class<IllegalAccessError> ILLEGAL_ACCESS_ERROR = IllegalAccessError.class;
    065
    066    /** Exception class: InstantiationError. */
    067    Class<InstantiationError> INSTANTIATION_ERROR = InstantiationError.class;
    068
    069    /** Exception class: NoSuchFieldError. */
    070    Class<NoSuchFieldError> NO_SUCH_FIELD_ERROR = NoSuchFieldError.class;
    071
    072    /** Exception class: NoSuchMethodError. */
    073    Class<NoSuchMethodError> NO_SUCH_METHOD_ERROR = NoSuchMethodError.class;
    074
    075    /** Exception class: NoClassDefFoundError. */
    076    Class<NoClassDefFoundError> NO_CLASS_DEF_FOUND_ERROR = NoClassDefFoundError.class;
    077
    078    /** Exception class: UnsatisfiedLinkError. */
    079    Class<UnsatisfiedLinkError> UNSATISFIED_LINK_ERROR = UnsatisfiedLinkError.class;
    080
    081    /** Exception class: VerifyError. */
    082    Class<VerifyError> VERIFY_ERROR = VerifyError.class;
    083    /* UnsupportedClassVersionError is new in JDK 1.2 */
    084//    Class UnsupportedClassVersionError = UnsupportedClassVersionError.class;
    085
    086    /**
    087     * Run-Time Exceptions.
    088     */
    089
    090    /** Exception class: NullPointerException. */
    091    Class<NullPointerException> NULL_POINTER_EXCEPTION = NullPointerException.class;
    092
    093    /** Exception class: ArrayIndexOutOfBoundsException. */
    094    Class<ArrayIndexOutOfBoundsException> ARRAY_INDEX_OUT_OF_BOUNDS_EXCEPTION = ArrayIndexOutOfBoundsException.class;
    095
    096    /** Exception class: ArithmeticException. */
    097    Class<ArithmeticException> ARITHMETIC_EXCEPTION = ArithmeticException.class;
    098
    099    /** Exception class: NegativeArraySizeException. */
    100    Class<NegativeArraySizeException> NEGATIVE_ARRAY_SIZE_EXCEPTION = NegativeArraySizeException.class;
    101
    102    /** Exception class: ClassCastException. */
    103    Class<ClassCastException> CLASS_CAST_EXCEPTION = ClassCastException.class;
    104
    105    /** Exception class: IllegalMonitorStateException. */
    106    Class<IllegalMonitorStateException> ILLEGAL_MONITOR_STATE = IllegalMonitorStateException.class;
    107
    108    /**
    109     * Pre-defined exception arrays according to chapters 5.1-5.4 of the Java Virtual Machine Specification.
    110     *
    111     * @deprecated Do not use these arrays, use the static methods in the ExceptionConst implementation class instead.
    112     */
    113    @Deprecated
    114    Class<?>[] EXCS_CLASS_AND_INTERFACE_RESOLUTION = {NO_CLASS_DEF_FOUND_ERROR, CLASS_FORMAT_ERROR, VERIFY_ERROR, ABSTRACT_METHOD_ERROR,
    115        EXCEPTION_IN_INITIALIZER_ERROR, ILLEGAL_ACCESS_ERROR}; // Chapter 5.1
    116
    117    /** Exception array for field and method resolution. @deprecated Do not use. */
    118    @Deprecated
    119    Class<?>[] EXCS_FIELD_AND_METHOD_RESOLUTION = {NO_SUCH_FIELD_ERROR, ILLEGAL_ACCESS_ERROR, NO_SUCH_METHOD_ERROR}; // Chapter 5.2
    120
    121    /**
    122     * Empty array.
    123     */
    124    @Deprecated
    125    Class<?>[] EXCS_INTERFACE_METHOD_RESOLUTION = new Class[0]; // Chapter 5.3 (as below)
    126
    127    /**
    128     * Empty array.
    129     */
    130    @Deprecated
    131    Class<?>[] EXCS_STRING_RESOLUTION = new Class[0];
    132
    133    /** Exception array. @deprecated Do not use. */
    134    @Deprecated
    135    Class<?>[] EXCS_ARRAY_EXCEPTION = {NULL_POINTER_EXCEPTION, ARRAY_INDEX_OUT_OF_BOUNDS_EXCEPTION};
    136
    137}