View Javadoc

1   /*
2    * Licensed to the Apache Software Foundation (ASF) under one or more
3    * contributor license agreements.  See the NOTICE file distributed with
4    * this work for additional information regarding copyright ownership.
5    * The ASF licenses this file to You under the Apache License, Version 2.0
6    * (the "License"); you may not use this file except in compliance with
7    * the License.  You may obtain a copy of the License at
8    * 
9    *     http://www.apache.org/licenses/LICENSE-2.0
10   * 
11   * Unless required by applicable law or agreed to in writing, software 
12   * distributed under the License is distributed on an "AS IS" BASIS, 
13   * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 
14   * See the License for the specific language governing permissions and 
15   * limitations under the License.
16   */
17  
18  
19  package org.apache.jdo.impl.enhancer.classfile;
20  
21  /***
22   * VMConstants is a collection of the constants defined in the
23   *   virtual machine spec.
24   * Also included are several assorted constants of our own which
25   *   seem logical to define here.
26   */
27  public interface VMConstants {
28      /* Access types */
29      static final int ACCPublic        = 0x0001;
30      static final int ACCPrivate       = 0x0002;
31      static final int ACCProtected     = 0x0004;
32      static final int ACCStatic        = 0x0008;
33      static final int ACCFinal         = 0x0010;
34      static final int ACCSuper         = 0x0020;   /* For Class file */
35      static final int ACCSynchronized  = 0x0020;   /* For methods    */
36      static final int ACCVolatile      = 0x0040;
37      static final int ACCTransient     = 0x0080;
38      static final int ACCNative        = 0x0100;
39      static final int ACCInterface     = 0x0200;
40      static final int ACCAbstract      = 0x0400;
41  
42  
43      /* Primitive Types */
44      /* These correspond to the values used by newarray */
45      static final int T_BOOLEAN = 4;
46      static final int T_CHAR = 5;
47      static final int T_FLOAT = 6;
48      static final int T_DOUBLE = 7;
49      static final int T_BYTE = 8;
50      static final int T_SHORT = 9;
51      static final int T_INT = 10;
52      static final int T_LONG = 11;
53  
54      /* Class types - Not really part of the VM spec */
55      static final int TC_OBJECT = 12;
56      static final int TC_INTERFACE = 13;
57      static final int TC_STRING = 14;
58  
59      /* Special pseudo types - Not really part of the VM spec */
60      static final int T_UNKNOWN = 15;
61      static final int T_WORD = 16;
62      static final int T_TWOWORD = 17;
63  
64      /* Constant pool types */
65      static final int CONSTANTUtf8 = 1;
66      static final int CONSTANTUnicode = 2; /* Def.in Beta doc - not in 1.0.2 */
67      static final int CONSTANTInteger = 3;
68      static final int CONSTANTFloat = 4;
69      static final int CONSTANTLong = 5;
70      static final int CONSTANTDouble = 6;
71      static final int CONSTANTClass = 7;
72      static final int CONSTANTString = 8;
73      static final int CONSTANTFieldRef = 9;
74      static final int CONSTANTMethodRef = 10;
75      static final int CONSTANTInterfaceMethodRef = 11;
76      static final int CONSTANTNameAndType = 12;
77  
78  
79  
80      /* Java VM opcodes */
81      final static int opc_nop = 0;
82      final static int opc_aconst_null = 1;
83      final static int opc_iconst_m1 = 2;
84      final static int opc_iconst_0 = 3;
85      final static int opc_iconst_1 = 4;
86      final static int opc_iconst_2 = 5;
87      final static int opc_iconst_3 = 6;
88      final static int opc_iconst_4 = 7;
89      final static int opc_iconst_5 = 8;
90      final static int opc_lconst_0 = 9;
91      final static int opc_lconst_1 = 10;
92      final static int opc_fconst_0 = 11;
93      final static int opc_fconst_1 = 12;
94      final static int opc_fconst_2 = 13;
95      final static int opc_dconst_0 = 14;
96      final static int opc_dconst_1 = 15;
97      final static int opc_bipush = 16;
98      final static int opc_sipush = 17;
99      final static int opc_ldc = 18;
100     final static int opc_ldc_w = 19;
101     final static int opc_ldc2_w = 20;
102     final static int opc_iload = 21;
103     final static int opc_lload = 22;
104     final static int opc_fload = 23;
105     final static int opc_dload = 24;
106     final static int opc_aload = 25;
107     final static int opc_iload_0 = 26;
108     final static int opc_iload_1 = 27;
109     final static int opc_iload_2 = 28;
110     final static int opc_iload_3 = 29;
111     final static int opc_lload_0 = 30;
112     final static int opc_lload_1 = 31;
113     final static int opc_lload_2 = 32;
114     final static int opc_lload_3 = 33;
115     final static int opc_fload_0 = 34;
116     final static int opc_fload_1 = 35;
117     final static int opc_fload_2 = 36;
118     final static int opc_fload_3 = 37;
119     final static int opc_dload_0 = 38;
120     final static int opc_dload_1 = 39;
121     final static int opc_dload_2 = 40;
122     final static int opc_dload_3 = 41;
123     final static int opc_aload_0 = 42;
124     final static int opc_aload_1 = 43;
125     final static int opc_aload_2 = 44;
126     final static int opc_aload_3 = 45;
127     final static int opc_iaload = 46;
128     final static int opc_laload = 47;
129     final static int opc_faload = 48;
130     final static int opc_daload = 49;
131     final static int opc_aaload = 50;
132     final static int opc_baload = 51;
133     final static int opc_caload = 52;
134     final static int opc_saload = 53;
135     final static int opc_istore = 54;
136     final static int opc_lstore = 55;
137     final static int opc_fstore = 56;
138     final static int opc_dstore = 57;
139     final static int opc_astore = 58;
140     final static int opc_istore_0 = 59;
141     final static int opc_istore_1 = 60;
142     final static int opc_istore_2 = 61;
143     final static int opc_istore_3 = 62;
144     final static int opc_lstore_0 = 63;
145     final static int opc_lstore_1 = 64;
146     final static int opc_lstore_2 = 65;
147     final static int opc_lstore_3 = 66;
148     final static int opc_fstore_0 = 67;
149     final static int opc_fstore_1 = 68;
150     final static int opc_fstore_2 = 69;
151     final static int opc_fstore_3 = 70;
152     final static int opc_dstore_0 = 71;
153     final static int opc_dstore_1 = 72;
154     final static int opc_dstore_2 = 73;
155     final static int opc_dstore_3 = 74;
156     final static int opc_astore_0 = 75;
157     final static int opc_astore_1 = 76;
158     final static int opc_astore_2 = 77;
159     final static int opc_astore_3 = 78;
160     final static int opc_iastore = 79;
161     final static int opc_lastore = 80;
162     final static int opc_fastore = 81;
163     final static int opc_dastore = 82;
164     final static int opc_aastore = 83;
165     final static int opc_bastore = 84;
166     final static int opc_castore = 85;
167     final static int opc_sastore = 86;
168     final static int opc_pop = 87;
169     final static int opc_pop2 = 88;
170     final static int opc_dup = 89;
171     final static int opc_dup_x1 = 90;
172     final static int opc_dup_x2 = 91;
173     final static int opc_dup2 = 92;
174     final static int opc_dup2_x1 = 93;
175     final static int opc_dup2_x2 = 94;
176     final static int opc_swap = 95;
177     final static int opc_iadd = 96;
178     final static int opc_ladd = 97;
179     final static int opc_fadd = 98;
180     final static int opc_dadd = 99;
181     final static int opc_isub = 100;
182     final static int opc_lsub = 101;
183     final static int opc_fsub = 102;
184     final static int opc_dsub = 103;
185     final static int opc_imul = 104;
186     final static int opc_lmul = 105;
187     final static int opc_fmul = 106;
188     final static int opc_dmul = 107;
189     final static int opc_idiv = 108;
190     final static int opc_ldiv = 109;
191     final static int opc_fdiv = 110;
192     final static int opc_ddiv = 111;
193     final static int opc_irem = 112;
194     final static int opc_lrem = 113;
195     final static int opc_frem = 114;
196     final static int opc_drem = 115;
197     final static int opc_ineg = 116;
198     final static int opc_lneg = 117;
199     final static int opc_fneg = 118;
200     final static int opc_dneg = 119;
201     final static int opc_ishl = 120;
202     final static int opc_lshl = 121;
203     final static int opc_ishr = 122;
204     final static int opc_lshr = 123;
205     final static int opc_iushr = 124;
206     final static int opc_lushr = 125;
207     final static int opc_iand = 126;
208     final static int opc_land = 127;
209     final static int opc_ior = 128;
210     final static int opc_lor = 129;
211     final static int opc_ixor = 130;
212     final static int opc_lxor = 131;
213     final static int opc_iinc = 132;
214     final static int opc_i2l = 133;
215     final static int opc_i2f = 134;
216     final static int opc_i2d = 135;
217     final static int opc_l2i = 136;
218     final static int opc_l2f = 137;
219     final static int opc_l2d = 138;
220     final static int opc_f2i = 139;
221     final static int opc_f2l = 140;
222     final static int opc_f2d = 141;
223     final static int opc_d2i = 142;
224     final static int opc_d2l = 143;
225     final static int opc_d2f = 144;
226     final static int opc_i2b = 145;
227     final static int opc_i2c = 146;
228     final static int opc_i2s = 147;
229     final static int opc_lcmp = 148;
230     final static int opc_fcmpl = 149;
231     final static int opc_fcmpg = 150;
232     final static int opc_dcmpl = 151;
233     final static int opc_dcmpg = 152;
234     final static int opc_ifeq = 153;
235     final static int opc_ifne = 154;
236     final static int opc_iflt = 155;
237     final static int opc_ifge = 156;
238     final static int opc_ifgt = 157;
239     final static int opc_ifle = 158;
240     final static int opc_if_icmpeq = 159;
241     final static int opc_if_icmpne = 160;
242     final static int opc_if_icmplt = 161;
243     final static int opc_if_icmpge = 162;
244     final static int opc_if_icmpgt = 163;
245     final static int opc_if_icmple = 164;
246     final static int opc_if_acmpeq = 165;
247     final static int opc_if_acmpne = 166;
248     final static int opc_goto = 167;
249     final static int opc_jsr = 168;
250     final static int opc_ret = 169;
251     final static int opc_tableswitch = 170;
252     final static int opc_lookupswitch = 171;
253     final static int opc_ireturn = 172;
254     final static int opc_lreturn = 173;
255     final static int opc_freturn = 174;
256     final static int opc_dreturn = 175;
257     final static int opc_areturn = 176;
258     final static int opc_return = 177;
259     final static int opc_getstatic = 178;
260     final static int opc_putstatic = 179;
261     final static int opc_getfield = 180;
262     final static int opc_putfield = 181;
263     final static int opc_invokevirtual = 182;
264     final static int opc_invokespecial = 183;
265     final static int opc_invokestatic = 184;
266     final static int opc_invokeinterface = 185;
267     final static int opc_xxxunusedxxx = 186;
268     final static int opc_new = 187;
269     final static int opc_newarray = 188;
270     final static int opc_anewarray = 189;
271     final static int opc_arraylength = 190;
272     final static int opc_athrow = 191;
273     final static int opc_checkcast = 192;
274     final static int opc_instanceof = 193;
275     final static int opc_monitorenter = 194;
276     final static int opc_monitorexit = 195;
277     final static int opc_wide = 196;
278     final static int opc_multianewarray = 197;
279     final static int opc_ifnull = 198;
280     final static int opc_ifnonnull = 199;
281     final static int opc_goto_w = 200;
282     final static int opc_jsr_w = 201;
283 }