1 /*
2  * Copyright (C) 2011 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.io;
18 
19 /**
20  * The various types that an index in a Dalvik instruction might refer to.
21  */
22 public enum IndexType {
23     /** "Unknown." Used for undefined opcodes. */
24     UNKNOWN,
25 
26     /** no index used */
27     NONE,
28 
29     /** "It depends." Used for {@code throw-verification-error}. */
30     VARIES,
31 
32     /** type reference index */
33     TYPE_REF,
34 
35     /** string reference index */
36     STRING_REF,
37 
38     /** method reference index */
39     METHOD_REF,
40 
41     /** field reference index */
42     FIELD_REF,
43 
44     /** method index and a proto index */
45     METHOD_AND_PROTO_REF,
46 
47     /** call site reference index */
48     CALL_SITE_REF,
49 
50     /** inline method index (for inline linked method invocations) */
51     INLINE_METHOD,
52 
53     /** direct vtable offset (for static linked method invocations) */
54     VTABLE_OFFSET,
55 
56     /** direct field offset (for static linked field accesses) */
57     FIELD_OFFSET,
58 
59     /** method handle reference index (for loading constant method handles) */
60     METHOD_HANDLE_REF,
61 
62     /** proto reference index (for loading constant proto ref) */
63     PROTO_REF;
64 }
65