KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > logicalcobwebs > 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  * Contact: Eric.Bruneton@rd.francetelecom.com
31  *
32  * Author: Eric Bruneton
33  */

34
35 package org.logicalcobwebs.asm;
36
37 /**
38  * Defines the JVM opcodes, access flags and array type codes. This interface
39  * does not define all the JVM opcodes because some opcodes are automatically
40  * handled. For example, the xLOAD and xSTORE opcodes are automatically replaced
41  * by xLOAD_n and xSTORE_n opcodes when possible. The xLOAD_n and xSTORE_n
42  * opcodes are therefore not defined in this interface. Likewise for LDC,
43  * automatically replaced by LDC_W or LDC2_W when necessary, WIDE, GOTO_W and
44  * JSR_W.
45  */

46
47 public interface Constants {
48
49   // access flags
50

51   int ACC_PUBLIC = 1;
52   int ACC_PRIVATE = 2;
53   int ACC_PROTECTED = 4;
54   int ACC_STATIC = 8;
55   int ACC_FINAL = 16;
56   int ACC_SYNCHRONIZED = 32;
57   int ACC_VOLATILE = 64;
58   int ACC_TRANSIENT = 128;
59   int ACC_NATIVE = 256;
60   int ACC_INTERFACE = 512;
61   int ACC_ABSTRACT = 1024;
62   int ACC_STRICT = 2048;
63   int ACC_SUPER = 32;
64
65   int ACC_SYNTHETIC = 65536;
66   int ACC_DEPRECATED = 131072;
67
68   // types for NEWARRAY
69

70   int T_BOOLEAN = 4;
71   int T_CHAR = 5;
72   int T_FLOAT = 6;
73   int T_DOUBLE = 7;
74   int T_BYTE = 8;
75   int T_SHORT = 9;
76   int T_INT = 10;
77   int T_LONG = 11;
78
79   // opcodes // visit method (- = idem)
80

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