KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > oracle > toplink > libraries > asm > Constants


1 /***
2  * ASM: a very small and fast Java bytecode manipulation framework
3  * Copyright (c) 2000,2002,2003 INRIA, France Telecom
4  * All rights reserved.
5  *
6  * Redistribution and use in source and binary forms, with or without
7  * modification, are permitted provided that the following conditions
8  * are met:
9  * 1. Redistributions of source code must retain the above copyright
10  * notice, this list of conditions and the following disclaimer.
11  * 2. Redistributions in binary form must reproduce the above copyright
12  * notice, this list of conditions and the following disclaimer in the
13  * documentation and/or other materials provided with the distribution.
14  * 3. Neither the name of the copyright holders nor the names of its
15  * contributors may be used to endorse or promote products derived from
16  * this software without specific prior written permission.
17  *
18  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
19  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
20  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
21  * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
22  * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
23  * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
24  * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
25  * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
26  * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
27  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
28  * THE POSSIBILITY OF SUCH DAMAGE.
29  */

30
31 package oracle.toplink.libraries.asm;
32
33 /**
34  * Defines the JVM opcodes, access flags and array type codes. This interface
35  * does not define all the JVM opcodes because some opcodes are automatically
36  * handled. For example, the xLOAD and xSTORE opcodes are automatically replaced
37  * by xLOAD_n and xSTORE_n opcodes when possible. The xLOAD_n and xSTORE_n
38  * opcodes are therefore not defined in this interface. Likewise for LDC,
39  * automatically replaced by LDC_W or LDC2_W when necessary, WIDE, GOTO_W and
40  * JSR_W.
41  *
42  * @author Eric Bruneton, Eugene Kuleshov
43  */

44
45 public interface Constants {
46
47   // versions
48

49   int V1_1 = 3 << 16 | 45;
50   int V1_2 = 0 << 16 | 46;
51   int V1_3 = 0 << 16 | 47;
52   int V1_4 = 0 << 16 | 48;
53   int V1_5 = 0 << 16 | 49;
54   
55   // access flags
56

57   int ACC_PUBLIC = 0x0001; // class, field, method
58
int ACC_PRIVATE = 0x0002; // class, field, method
59
int ACC_PROTECTED = 0x0004; // class, field, method
60
int ACC_STATIC = 0x0008; // field, method
61
int ACC_FINAL = 0x0010; // class, field, method
62
int ACC_SUPER = 0x0020; // class
63
int ACC_SYNCHRONIZED = 0x0020; // method
64
int ACC_VOLATILE = 0x0040; // field
65
int ACC_BRIDGE = 0x0040; // method
66
int ACC_VARARGS = 0x0080; // method
67
int ACC_TRANSIENT = 0x0080; // field
68
int ACC_NATIVE = 0x0100; // method
69
int ACC_INTERFACE = 0x0200; // class
70
int ACC_ABSTRACT = 0x0400; // class, method
71
int ACC_STRICT = 0x0800; // method
72
int ACC_SYNTHETIC = 0x1000; // class, field, method
73
int ACC_ANNOTATION = 0x2000; // class
74
int ACC_ENUM = 0x4000; // class(?) field inner
75

76   // ASM specific pseudo access flags
77

78   int ACC_DEPRECATED = 131072; // class, field, method
79

80   // types for NEWARRAY
81

82   int T_BOOLEAN = 4;
83   int T_CHAR = 5;
84   int T_FLOAT = 6;
85   int T_DOUBLE = 7;
86   int T_BYTE = 8;
87   int T_SHORT = 9;
88   int T_INT = 10;
89   int T_LONG = 11;
90
91   // opcodes // visit method (- = idem)
92

93   int NOP = 0; // visitInsn
94
int ACONST_NULL = 1; // -
95
int ICONST_M1 = 2; // -
96
int ICONST_0 = 3; // -
97
int ICONST_1 = 4; // -
98
int ICONST_2 = 5; // -
99
int ICONST_3 = 6; // -
100
int ICONST_4 = 7; // -
101
int ICONST_5 = 8; // -
102
int LCONST_0 = 9; // -
103
int LCONST_1 = 10; // -
104
int FCONST_0 = 11; // -
105
int FCONST_1 = 12; // -
106
int FCONST_2 = 13; // -
107
int DCONST_0 = 14; // -
108
int DCONST_1 = 15; // -
109
int BIPUSH = 16; // visitIntInsn
110
int SIPUSH = 17; // -
111
int LDC = 18; // visitLdcInsn
112
//int LDC_W = 19; // -
113
//int LDC2_W = 20; // -
114
int ILOAD = 21; // visitVarInsn
115
int LLOAD = 22; // -
116
int FLOAD = 23; // -
117
int DLOAD = 24; // -
118
int ALOAD = 25; // -
119
//int ILOAD_0 = 26; // -
120
//int ILOAD_1 = 27; // -
121
//int ILOAD_2 = 28; // -
122
//int ILOAD_3 = 29; // -
123
//int LLOAD_0 = 30; // -
124
//int LLOAD_1 = 31; // -
125
//int LLOAD_2 = 32; // -
126
//int LLOAD_3 = 33; // -
127
//int FLOAD_0 = 34; // -
128
//int FLOAD_1 = 35; // -
129
//int FLOAD_2 = 36; // -
130
//int FLOAD_3 = 37; // -
131
//int DLOAD_0 = 38; // -
132
//int DLOAD_1 = 39; // -
133
//int DLOAD_2 = 40; // -
134
//int DLOAD_3 = 41; // -
135
//int ALOAD_0 = 42; // -
136
//int ALOAD_1 = 43; // -
137
//int ALOAD_2 = 44; // -
138
//int ALOAD_3 = 45; // -
139
int IALOAD = 46; // visitInsn
140
int LALOAD = 47; // -
141
int FALOAD = 48; // -
142
int DALOAD = 49; // -
143
int AALOAD = 50; // -
144
int BALOAD = 51; // -
145
int CALOAD = 52; // -
146
int SALOAD = 53; // -
147
int ISTORE = 54; // visitVarInsn
148
int LSTORE = 55; // -
149
int FSTORE = 56; // -
150
int DSTORE = 57; // -
151
int ASTORE = 58; // -
152
//int ISTORE_0 = 59; // -
153
//int ISTORE_1 = 60; // -
154
//int ISTORE_2 = 61; // -
155
//int ISTORE_3 = 62; // -
156
//int LSTORE_0 = 63; // -
157
//int LSTORE_1 = 64; // -
158
//int LSTORE_2 = 65; // -
159
//int LSTORE_3 = 66; // -
160
//int FSTORE_0 = 67; // -
161
//int FSTORE_1 = 68; // -
162
//int FSTORE_2 = 69; // -
163
//int FSTORE_3 = 70; // -
164
//int DSTORE_0 = 71; // -
165
//int DSTORE_1 = 72; // -
166
//int DSTORE_2 = 73; // -
167
//int DSTORE_3 = 74; // -
168
//int ASTORE_0 = 75; // -
169
//int ASTORE_1 = 76; // -
170
//int ASTORE_2 = 77; // -
171
//int ASTORE_3 = 78; // -
172
int IASTORE = 79; // visitInsn
173
int LASTORE = 80; // -
174
int FASTORE = 81; // -
175
int DASTORE = 82; // -
176
int AASTORE = 83; // -
177
int BASTORE = 84; // -
178
int CASTORE = 85; // -
179
int SASTORE = 86; // -
180
int POP = 87; // -
181
int POP2 = 88; // -
182
int DUP = 89; // -
183
int DUP_X1 = 90; // -
184
int DUP_X2 = 91; // -
185
int DUP2 = 92; // -
186
int DUP2_X1 = 93; // -
187
int DUP2_X2 = 94; // -
188
int SWAP = 95; // -
189
int IADD = 96; // -
190
int LADD = 97; // -
191
int FADD = 98; // -
192
int DADD = 99; // -
193
int ISUB = 100; // -
194
int LSUB = 101; // -
195
int FSUB = 102; // -
196
int DSUB = 103; // -
197
int IMUL = 104; // -
198
int LMUL = 105; // -
199
int FMUL = 106; // -
200
int DMUL = 107; // -
201
int IDIV = 108; // -
202
int LDIV = 109; // -
203
int FDIV = 110; // -
204
int DDIV = 111; // -
205
int IREM = 112; // -
206
int LREM = 113; // -
207
int FREM = 114; // -
208
int DREM = 115; // -
209
int INEG = 116; // -
210
int LNEG = 117; // -
211
int FNEG = 118; // -
212
int DNEG = 119; // -
213
int ISHL = 120; // -
214
int LSHL = 121; // -
215
int ISHR = 122; // -
216
int LSHR = 123; // -
217
int IUSHR = 124; // -
218
int LUSHR = 125; // -
219
int IAND = 126; // -
220
int LAND = 127; // -
221
int IOR = 128; // -
222
int LOR = 129; // -
223
int IXOR = 130; // -
224
int LXOR = 131; // -
225
int IINC = 132; // visitIincInsn
226
int I2L = 133; // visitInsn
227
int I2F = 134; // -
228
int I2D = 135; // -
229
int L2I = 136; // -
230
int L2F = 137; // -
231
int L2D = 138; // -
232
int F2I = 139; // -
233
int F2L = 140; // -
234
int F2D = 141; // -
235
int D2I = 142; // -
236
int D2L = 143; // -
237
int D2F = 144; // -
238
int I2B = 145; // -
239
int I2C = 146; // -
240
int I2S = 147; // -
241
int LCMP = 148; // -
242
int FCMPL = 149; // -
243
int FCMPG = 150; // -
244
int DCMPL = 151; // -
245
int DCMPG = 152; // -
246
int IFEQ = 153; // visitJumpInsn
247
int IFNE = 154; // -
248
int IFLT = 155; // -
249
int IFGE = 156; // -
250
int IFGT = 157; // -
251
int IFLE = 158; // -
252
int IF_ICMPEQ = 159; // -
253
int IF_ICMPNE = 160; // -
254
int IF_ICMPLT = 161; // -
255
int IF_ICMPGE = 162; // -
256
int IF_ICMPGT = 163; // -
257
int IF_ICMPLE = 164; // -
258
int IF_ACMPEQ = 165; // -
259
int IF_ACMPNE = 166; // -
260
int GOTO = 167; // -
261
int JSR = 168; // -
262
int RET = 169; // visitVarInsn
263
int TABLESWITCH = 170; // visiTableSwitchInsn
264
int LOOKUPSWITCH = 171; // visitLookupSwitch
265
int IRETURN = 172; // visitInsn
266
int LRETURN = 173; // -
267
int FRETURN = 174; // -
268
int DRETURN = 175; // -
269
int ARETURN = 176; // -
270
int RETURN = 177; // -
271
int GETSTATIC = 178; // visitFieldInsn
272
int PUTSTATIC = 179; // -
273
int GETFIELD = 180; // -
274
int PUTFIELD = 181; // -
275
int INVOKEVIRTUAL = 182; // visitMethodInsn
276
int INVOKESPECIAL = 183; // -
277
int INVOKESTATIC = 184; // -
278
int INVOKEINTERFACE = 185; // -
279
//int UNUSED = 186; // NOT VISITED
280
int NEW = 187; // visitTypeInsn
281
int NEWARRAY = 188; // visitIntInsn
282
int ANEWARRAY = 189; // visitTypeInsn
283
int ARRAYLENGTH = 190; // visitInsn
284
int ATHROW = 191; // -
285
int CHECKCAST = 192; // visitTypeInsn
286
int INSTANCEOF = 193; // -
287
int MONITORENTER = 194; // visitInsn
288
int MONITOREXIT = 195; // -
289
//int WIDE = 196; // NOT VISITED
290
int MULTIANEWARRAY = 197; // visitMultiANewArrayInsn
291
int IFNULL = 198; // visitJumpInsn
292
int IFNONNULL = 199; // -
293
//int GOTO_W = 200; // -
294
//int JSR_W = 201; // -
295
}
296
Popular Tags