1 /* 2 * Copyright (C) 2007 The Android Open Source Project 3 * 4 * Licensed under the Apache License, Version 2.0 (the "License"); 5 * you may not use this file except in compliance with the License. 6 * You may obtain a copy of the License at 7 * 8 * http://www.apache.org/licenses/LICENSE-2.0 9 * 10 * Unless required by applicable law or agreed to in writing, software 11 * distributed under the License is distributed on an "AS IS" BASIS, 12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 * See the License for the specific language governing permissions and 14 * limitations under the License. 15 */ 16 17 package com.android.dx.rop.code; 18 19 import com.android.dx.rop.type.StdTypeList; 20 import com.android.dx.rop.type.Type; 21 22 /** 23 * Common exception types. 24 */ 25 public final class Exceptions { 26 /** {@code non-null;} the type {@code java.lang.ArithmeticException} */ 27 public static final Type TYPE_ArithmeticException = 28 Type.intern("Ljava/lang/ArithmeticException;"); 29 30 /** 31 * {@code non-null;} the type 32 * {@code java.lang.ArrayIndexOutOfBoundsException} 33 */ 34 public static final Type TYPE_ArrayIndexOutOfBoundsException = 35 Type.intern("Ljava/lang/ArrayIndexOutOfBoundsException;"); 36 37 /** {@code non-null;} the type {@code java.lang.ArrayStoreException} */ 38 public static final Type TYPE_ArrayStoreException = 39 Type.intern("Ljava/lang/ArrayStoreException;"); 40 41 /** {@code non-null;} the type {@code java.lang.ClassCastException} */ 42 public static final Type TYPE_ClassCastException = 43 Type.intern("Ljava/lang/ClassCastException;"); 44 45 /** {@code non-null;} the type {@code java.lang.Error} */ 46 public static final Type TYPE_Error = Type.intern("Ljava/lang/Error;"); 47 48 /** 49 * {@code non-null;} the type 50 * {@code java.lang.IllegalMonitorStateException} 51 */ 52 public static final Type TYPE_IllegalMonitorStateException = 53 Type.intern("Ljava/lang/IllegalMonitorStateException;"); 54 55 /** {@code non-null;} the type {@code java.lang.NegativeArraySizeException} */ 56 public static final Type TYPE_NegativeArraySizeException = 57 Type.intern("Ljava/lang/NegativeArraySizeException;"); 58 59 /** {@code non-null;} the type {@code java.lang.NullPointerException} */ 60 public static final Type TYPE_NullPointerException = 61 Type.intern("Ljava/lang/NullPointerException;"); 62 63 /** {@code non-null;} the list {@code [java.lang.Error]} */ 64 public static final StdTypeList LIST_Error = StdTypeList.make(TYPE_Error); 65 66 /** 67 * {@code non-null;} the list {@code[java.lang.Error, 68 * java.lang.ArithmeticException]} 69 */ 70 public static final StdTypeList LIST_Error_ArithmeticException = 71 StdTypeList.make(TYPE_Error, TYPE_ArithmeticException); 72 73 /** 74 * {@code non-null;} the list {@code[java.lang.Error, 75 * java.lang.ClassCastException]} 76 */ 77 public static final StdTypeList LIST_Error_ClassCastException = 78 StdTypeList.make(TYPE_Error, TYPE_ClassCastException); 79 80 /** 81 * {@code non-null;} the list {@code [java.lang.Error, 82 * java.lang.NegativeArraySizeException]} 83 */ 84 public static final StdTypeList LIST_Error_NegativeArraySizeException = 85 StdTypeList.make(TYPE_Error, TYPE_NegativeArraySizeException); 86 87 /** 88 * {@code non-null;} the list {@code [java.lang.Error, 89 * java.lang.NullPointerException]} 90 */ 91 public static final StdTypeList LIST_Error_NullPointerException = 92 StdTypeList.make(TYPE_Error, TYPE_NullPointerException); 93 94 /** 95 * {@code non-null;} the list {@code [java.lang.Error, 96 * java.lang.NullPointerException, 97 * java.lang.ArrayIndexOutOfBoundsException]} 98 */ 99 public static final StdTypeList LIST_Error_Null_ArrayIndexOutOfBounds = 100 StdTypeList.make(TYPE_Error, 101 TYPE_NullPointerException, 102 TYPE_ArrayIndexOutOfBoundsException); 103 104 /** 105 * {@code non-null;} the list {@code [java.lang.Error, 106 * java.lang.NullPointerException, 107 * java.lang.ArrayIndexOutOfBoundsException, 108 * java.lang.ArrayStoreException]} 109 */ 110 public static final StdTypeList LIST_Error_Null_ArrayIndex_ArrayStore = 111 StdTypeList.make(TYPE_Error, 112 TYPE_NullPointerException, 113 TYPE_ArrayIndexOutOfBoundsException, 114 TYPE_ArrayStoreException); 115 116 /** 117 * {@code non-null;} the list {@code [java.lang.Error, 118 * java.lang.NullPointerException, 119 * java.lang.IllegalMonitorStateException]} 120 */ 121 public static final StdTypeList 122 LIST_Error_Null_IllegalMonitorStateException = 123 StdTypeList.make(TYPE_Error, 124 TYPE_NullPointerException, 125 TYPE_IllegalMonitorStateException); 126 127 /** 128 * This class is uninstantiable. 129 */ Exceptions()130 private Exceptions() { 131 // This space intentionally left blank. 132 } 133 } 134