001: /*
002: * Copyright 2001 Sun Microsystems, Inc. All Rights Reserved.
003: * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
004: *
005: * This code is free software; you can redistribute it and/or modify it
006: * under the terms of the GNU General Public License version 2 only, as
007: * published by the Free Software Foundation. Sun designates this
008: * particular file as subject to the "Classpath" exception as provided
009: * by Sun in the LICENSE file that accompanied this code.
010: *
011: * This code is distributed in the hope that it will be useful, but WITHOUT
012: * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
013: * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
014: * version 2 for more details (a copy is included in the LICENSE file that
015: * accompanied this code).
016: *
017: * You should have received a copy of the GNU General Public License version
018: * 2 along with this work; if not, write to the Free Software Foundation,
019: * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
020: *
021: * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
022: * CA 95054 USA or visit www.sun.com if you need additional information or
023: * have any questions.
024: */
025:
026: package sun.reflect;
027:
028: /** Minimal set of class file constants for assembly of field and
029: method accessors. */
030:
031: interface ClassFileConstants {
032: // Constants
033: public static final byte opc_aconst_null = (byte) 0x1;
034: public static final byte opc_sipush = (byte) 0x11;
035: public static final byte opc_ldc = (byte) 0x12;
036:
037: // Local variable loads and stores
038: public static final byte opc_iload_0 = (byte) 0x1a;
039: public static final byte opc_iload_1 = (byte) 0x1b;
040: public static final byte opc_iload_2 = (byte) 0x1c;
041: public static final byte opc_iload_3 = (byte) 0x1d;
042: public static final byte opc_lload_0 = (byte) 0x1e;
043: public static final byte opc_lload_1 = (byte) 0x1f;
044: public static final byte opc_lload_2 = (byte) 0x20;
045: public static final byte opc_lload_3 = (byte) 0x21;
046: public static final byte opc_fload_0 = (byte) 0x22;
047: public static final byte opc_fload_1 = (byte) 0x23;
048: public static final byte opc_fload_2 = (byte) 0x24;
049: public static final byte opc_fload_3 = (byte) 0x25;
050: public static final byte opc_dload_0 = (byte) 0x26;
051: public static final byte opc_dload_1 = (byte) 0x27;
052: public static final byte opc_dload_2 = (byte) 0x28;
053: public static final byte opc_dload_3 = (byte) 0x29;
054: public static final byte opc_aload_0 = (byte) 0x2a;
055: public static final byte opc_aload_1 = (byte) 0x2b;
056: public static final byte opc_aload_2 = (byte) 0x2c;
057: public static final byte opc_aload_3 = (byte) 0x2d;
058: public static final byte opc_aaload = (byte) 0x32;
059: public static final byte opc_astore_0 = (byte) 0x4b;
060: public static final byte opc_astore_1 = (byte) 0x4c;
061: public static final byte opc_astore_2 = (byte) 0x4d;
062: public static final byte opc_astore_3 = (byte) 0x4e;
063:
064: // Stack manipulation
065: public static final byte opc_pop = (byte) 0x57;
066: public static final byte opc_dup = (byte) 0x59;
067: public static final byte opc_dup_x1 = (byte) 0x5a;
068: public static final byte opc_swap = (byte) 0x5f;
069:
070: // Conversions
071: public static final byte opc_i2l = (byte) 0x85;
072: public static final byte opc_i2f = (byte) 0x86;
073: public static final byte opc_i2d = (byte) 0x87;
074: public static final byte opc_l2i = (byte) 0x88;
075: public static final byte opc_l2f = (byte) 0x89;
076: public static final byte opc_l2d = (byte) 0x8a;
077: public static final byte opc_f2i = (byte) 0x8b;
078: public static final byte opc_f2l = (byte) 0x8c;
079: public static final byte opc_f2d = (byte) 0x8d;
080: public static final byte opc_d2i = (byte) 0x8e;
081: public static final byte opc_d2l = (byte) 0x8f;
082: public static final byte opc_d2f = (byte) 0x90;
083: public static final byte opc_i2b = (byte) 0x91;
084: public static final byte opc_i2c = (byte) 0x92;
085: public static final byte opc_i2s = (byte) 0x93;
086:
087: // Control flow
088: public static final byte opc_ifeq = (byte) 0x99;
089: public static final byte opc_if_icmpeq = (byte) 0x9f;
090: public static final byte opc_goto = (byte) 0xa7;
091:
092: // Return instructions
093: public static final byte opc_ireturn = (byte) 0xac;
094: public static final byte opc_lreturn = (byte) 0xad;
095: public static final byte opc_freturn = (byte) 0xae;
096: public static final byte opc_dreturn = (byte) 0xaf;
097: public static final byte opc_areturn = (byte) 0xb0;
098: public static final byte opc_return = (byte) 0xb1;
099:
100: // Field operations
101: public static final byte opc_getstatic = (byte) 0xb2;
102: public static final byte opc_putstatic = (byte) 0xb3;
103: public static final byte opc_getfield = (byte) 0xb4;
104: public static final byte opc_putfield = (byte) 0xb5;
105:
106: // Method invocations
107: public static final byte opc_invokevirtual = (byte) 0xb6;
108: public static final byte opc_invokespecial = (byte) 0xb7;
109: public static final byte opc_invokestatic = (byte) 0xb8;
110: public static final byte opc_invokeinterface = (byte) 0xb9;
111:
112: // Array length
113: public static final byte opc_arraylength = (byte) 0xbe;
114:
115: // New
116: public static final byte opc_new = (byte) 0xbb;
117:
118: // Athrow
119: public static final byte opc_athrow = (byte) 0xbf;
120:
121: // Checkcast and instanceof
122: public static final byte opc_checkcast = (byte) 0xc0;
123: public static final byte opc_instanceof = (byte) 0xc1;
124:
125: // Ifnull and ifnonnull
126: public static final byte opc_ifnull = (byte) 0xc6;
127: public static final byte opc_ifnonnull = (byte) 0xc7;
128:
129: // Constant pool tags
130: public static final byte CONSTANT_Class = (byte) 7;
131: public static final byte CONSTANT_Fieldref = (byte) 9;
132: public static final byte CONSTANT_Methodref = (byte) 10;
133: public static final byte CONSTANT_InterfaceMethodref = (byte) 11;
134: public static final byte CONSTANT_NameAndType = (byte) 12;
135: public static final byte CONSTANT_String = (byte) 8;
136: public static final byte CONSTANT_Utf8 = (byte) 1;
137:
138: // Access flags
139: public static final short ACC_PUBLIC = (short) 0x0001;
140: }
|