jdk/src/share/classes/sun/reflect/ClassFileConstants.java
author ohair
Tue, 25 May 2010 15:58:33 -0700
changeset 5506 202f599c92aa
parent 2 90ce3da70b43
permissions -rw-r--r--
6943119: Rebrand source copyright notices Reviewed-by: darcy, weijun
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
     1
/*
5506
202f599c92aa 6943119: Rebrand source copyright notices
ohair
parents: 2
diff changeset
     2
 * Copyright (c) 2001, Oracle and/or its affiliates. All rights reserved.
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
     3
 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
90ce3da70b43 Initial load
duke
parents:
diff changeset
     4
 *
90ce3da70b43 Initial load
duke
parents:
diff changeset
     5
 * This code is free software; you can redistribute it and/or modify it
90ce3da70b43 Initial load
duke
parents:
diff changeset
     6
 * under the terms of the GNU General Public License version 2 only, as
5506
202f599c92aa 6943119: Rebrand source copyright notices
ohair
parents: 2
diff changeset
     7
 * published by the Free Software Foundation.  Oracle designates this
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
     8
 * particular file as subject to the "Classpath" exception as provided
5506
202f599c92aa 6943119: Rebrand source copyright notices
ohair
parents: 2
diff changeset
     9
 * by Oracle in the LICENSE file that accompanied this code.
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
    10
 *
90ce3da70b43 Initial load
duke
parents:
diff changeset
    11
 * This code is distributed in the hope that it will be useful, but WITHOUT
90ce3da70b43 Initial load
duke
parents:
diff changeset
    12
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
90ce3da70b43 Initial load
duke
parents:
diff changeset
    13
 * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
90ce3da70b43 Initial load
duke
parents:
diff changeset
    14
 * version 2 for more details (a copy is included in the LICENSE file that
90ce3da70b43 Initial load
duke
parents:
diff changeset
    15
 * accompanied this code).
90ce3da70b43 Initial load
duke
parents:
diff changeset
    16
 *
90ce3da70b43 Initial load
duke
parents:
diff changeset
    17
 * You should have received a copy of the GNU General Public License version
90ce3da70b43 Initial load
duke
parents:
diff changeset
    18
 * 2 along with this work; if not, write to the Free Software Foundation,
90ce3da70b43 Initial load
duke
parents:
diff changeset
    19
 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    20
 *
5506
202f599c92aa 6943119: Rebrand source copyright notices
ohair
parents: 2
diff changeset
    21
 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
202f599c92aa 6943119: Rebrand source copyright notices
ohair
parents: 2
diff changeset
    22
 * or visit www.oracle.com if you need additional information or have any
202f599c92aa 6943119: Rebrand source copyright notices
ohair
parents: 2
diff changeset
    23
 * questions.
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
    24
 */
90ce3da70b43 Initial load
duke
parents:
diff changeset
    25
90ce3da70b43 Initial load
duke
parents:
diff changeset
    26
package sun.reflect;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    27
90ce3da70b43 Initial load
duke
parents:
diff changeset
    28
/** Minimal set of class file constants for assembly of field and
90ce3da70b43 Initial load
duke
parents:
diff changeset
    29
    method accessors. */
90ce3da70b43 Initial load
duke
parents:
diff changeset
    30
90ce3da70b43 Initial load
duke
parents:
diff changeset
    31
interface ClassFileConstants {
90ce3da70b43 Initial load
duke
parents:
diff changeset
    32
    // Constants
90ce3da70b43 Initial load
duke
parents:
diff changeset
    33
    public static final byte opc_aconst_null   = (byte) 0x1;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    34
    public static final byte opc_sipush        = (byte) 0x11;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    35
    public static final byte opc_ldc           = (byte) 0x12;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    36
90ce3da70b43 Initial load
duke
parents:
diff changeset
    37
    // Local variable loads and stores
90ce3da70b43 Initial load
duke
parents:
diff changeset
    38
    public static final byte opc_iload_0       = (byte) 0x1a;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    39
    public static final byte opc_iload_1       = (byte) 0x1b;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    40
    public static final byte opc_iload_2       = (byte) 0x1c;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    41
    public static final byte opc_iload_3       = (byte) 0x1d;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    42
    public static final byte opc_lload_0       = (byte) 0x1e;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    43
    public static final byte opc_lload_1       = (byte) 0x1f;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    44
    public static final byte opc_lload_2       = (byte) 0x20;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    45
    public static final byte opc_lload_3       = (byte) 0x21;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    46
    public static final byte opc_fload_0       = (byte) 0x22;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    47
    public static final byte opc_fload_1       = (byte) 0x23;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    48
    public static final byte opc_fload_2       = (byte) 0x24;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    49
    public static final byte opc_fload_3       = (byte) 0x25;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    50
    public static final byte opc_dload_0       = (byte) 0x26;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    51
    public static final byte opc_dload_1       = (byte) 0x27;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    52
    public static final byte opc_dload_2       = (byte) 0x28;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    53
    public static final byte opc_dload_3       = (byte) 0x29;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    54
    public static final byte opc_aload_0       = (byte) 0x2a;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    55
    public static final byte opc_aload_1       = (byte) 0x2b;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    56
    public static final byte opc_aload_2       = (byte) 0x2c;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    57
    public static final byte opc_aload_3       = (byte) 0x2d;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    58
    public static final byte opc_aaload        = (byte) 0x32;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    59
    public static final byte opc_astore_0      = (byte) 0x4b;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    60
    public static final byte opc_astore_1      = (byte) 0x4c;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    61
    public static final byte opc_astore_2      = (byte) 0x4d;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    62
    public static final byte opc_astore_3      = (byte) 0x4e;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    63
90ce3da70b43 Initial load
duke
parents:
diff changeset
    64
    // Stack manipulation
90ce3da70b43 Initial load
duke
parents:
diff changeset
    65
    public static final byte opc_pop           = (byte) 0x57;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    66
    public static final byte opc_dup           = (byte) 0x59;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    67
    public static final byte opc_dup_x1        = (byte) 0x5a;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    68
    public static final byte opc_swap          = (byte) 0x5f;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    69
90ce3da70b43 Initial load
duke
parents:
diff changeset
    70
    // Conversions
90ce3da70b43 Initial load
duke
parents:
diff changeset
    71
    public static final byte opc_i2l           = (byte) 0x85;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    72
    public static final byte opc_i2f           = (byte) 0x86;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    73
    public static final byte opc_i2d           = (byte) 0x87;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    74
    public static final byte opc_l2i           = (byte) 0x88;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    75
    public static final byte opc_l2f           = (byte) 0x89;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    76
    public static final byte opc_l2d           = (byte) 0x8a;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    77
    public static final byte opc_f2i           = (byte) 0x8b;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    78
    public static final byte opc_f2l           = (byte) 0x8c;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    79
    public static final byte opc_f2d           = (byte) 0x8d;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    80
    public static final byte opc_d2i           = (byte) 0x8e;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    81
    public static final byte opc_d2l           = (byte) 0x8f;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    82
    public static final byte opc_d2f           = (byte) 0x90;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    83
    public static final byte opc_i2b           = (byte) 0x91;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    84
    public static final byte opc_i2c           = (byte) 0x92;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    85
    public static final byte opc_i2s           = (byte) 0x93;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    86
90ce3da70b43 Initial load
duke
parents:
diff changeset
    87
    // Control flow
90ce3da70b43 Initial load
duke
parents:
diff changeset
    88
    public static final byte opc_ifeq          = (byte) 0x99;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    89
    public static final byte opc_if_icmpeq     = (byte) 0x9f;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    90
    public static final byte opc_goto          = (byte) 0xa7;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    91
90ce3da70b43 Initial load
duke
parents:
diff changeset
    92
    // Return instructions
90ce3da70b43 Initial load
duke
parents:
diff changeset
    93
    public static final byte opc_ireturn       = (byte) 0xac;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    94
    public static final byte opc_lreturn       = (byte) 0xad;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    95
    public static final byte opc_freturn       = (byte) 0xae;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    96
    public static final byte opc_dreturn       = (byte) 0xaf;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    97
    public static final byte opc_areturn       = (byte) 0xb0;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    98
    public static final byte opc_return        = (byte) 0xb1;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    99
90ce3da70b43 Initial load
duke
parents:
diff changeset
   100
    // Field operations
90ce3da70b43 Initial load
duke
parents:
diff changeset
   101
    public static final byte opc_getstatic     = (byte) 0xb2;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   102
    public static final byte opc_putstatic     = (byte) 0xb3;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   103
    public static final byte opc_getfield      = (byte) 0xb4;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   104
    public static final byte opc_putfield      = (byte) 0xb5;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   105
90ce3da70b43 Initial load
duke
parents:
diff changeset
   106
    // Method invocations
90ce3da70b43 Initial load
duke
parents:
diff changeset
   107
    public static final byte opc_invokevirtual   = (byte) 0xb6;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   108
    public static final byte opc_invokespecial   = (byte) 0xb7;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   109
    public static final byte opc_invokestatic    = (byte) 0xb8;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   110
    public static final byte opc_invokeinterface = (byte) 0xb9;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   111
90ce3da70b43 Initial load
duke
parents:
diff changeset
   112
    // Array length
90ce3da70b43 Initial load
duke
parents:
diff changeset
   113
    public static final byte opc_arraylength     = (byte) 0xbe;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   114
90ce3da70b43 Initial load
duke
parents:
diff changeset
   115
    // New
90ce3da70b43 Initial load
duke
parents:
diff changeset
   116
    public static final byte opc_new           = (byte) 0xbb;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   117
90ce3da70b43 Initial load
duke
parents:
diff changeset
   118
    // Athrow
90ce3da70b43 Initial load
duke
parents:
diff changeset
   119
    public static final byte opc_athrow        = (byte) 0xbf;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   120
90ce3da70b43 Initial load
duke
parents:
diff changeset
   121
    // Checkcast and instanceof
90ce3da70b43 Initial load
duke
parents:
diff changeset
   122
    public static final byte opc_checkcast     = (byte) 0xc0;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   123
    public static final byte opc_instanceof    = (byte) 0xc1;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   124
90ce3da70b43 Initial load
duke
parents:
diff changeset
   125
    // Ifnull and ifnonnull
90ce3da70b43 Initial load
duke
parents:
diff changeset
   126
    public static final byte opc_ifnull        = (byte) 0xc6;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   127
    public static final byte opc_ifnonnull     = (byte) 0xc7;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   128
90ce3da70b43 Initial load
duke
parents:
diff changeset
   129
    // Constant pool tags
90ce3da70b43 Initial load
duke
parents:
diff changeset
   130
    public static final byte CONSTANT_Class              = (byte) 7;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   131
    public static final byte CONSTANT_Fieldref           = (byte) 9;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   132
    public static final byte CONSTANT_Methodref          = (byte) 10;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   133
    public static final byte CONSTANT_InterfaceMethodref = (byte) 11;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   134
    public static final byte CONSTANT_NameAndType        = (byte) 12;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   135
    public static final byte CONSTANT_String             = (byte) 8;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   136
    public static final byte CONSTANT_Utf8               = (byte) 1;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   137
90ce3da70b43 Initial load
duke
parents:
diff changeset
   138
    // Access flags
90ce3da70b43 Initial load
duke
parents:
diff changeset
   139
    public static final short ACC_PUBLIC = (short) 0x0001;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   140
}