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