001: /*
002: *
003: *
004: * Copyright 1990-2007 Sun Microsystems, Inc. All Rights Reserved.
005: * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER
006: *
007: * This program is free software; you can redistribute it and/or
008: * modify it under the terms of the GNU General Public License version
009: * 2 only, as published by the Free Software Foundation.
010: *
011: * This program is distributed in the hope that it will be useful, but
012: * WITHOUT ANY WARRANTY; without even the implied warranty of
013: * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
014: * General Public License version 2 for more details (a copy is
015: * included at /legal/license.txt).
016: *
017: * You should have received a copy of the GNU General Public License
018: * version 2 along with this work; if not, write to the Free Software
019: * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
020: * 02110-1301 USA
021: *
022: * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa
023: * Clara, CA 95054 or visit www.sun.com if you need additional
024: * information or have any questions.
025: */
026:
027: package util;
028:
029: /*
030: * Constants of the class file representation. This includes
031: * magic numbers, signature representation, type numbers, access flags.
032: * This DOES NOT include opcode numbers, which are, collectively,
033: * represented in a VM-specific (including quicks), generated file.
034: */
035:
036: public interface ClassFileConst {
037: public static final char SIGC_VOID = 86;
038: public static final String SIG_VOID = "V";
039: public static final char SIGC_BOOLEAN = 90;
040: public static final String SIG_BOOLEAN = "Z";
041: public static final char SIGC_BYTE = 66;
042: public static final String SIG_BYTE = "B";
043: public static final char SIGC_CHAR = 67;
044: public static final String SIG_CHAR = "C";
045: public static final char SIGC_SHORT = 83;
046: public static final String SIG_SHORT = "S";
047: public static final char SIGC_INT = 73;
048: public static final String SIG_INT = "I";
049: public static final char SIGC_LONG = 74;
050: public static final String SIG_LONG = "J";
051: public static final char SIGC_FLOAT = 70;
052: public static final String SIG_FLOAT = "F";
053: public static final char SIGC_DOUBLE = 68;
054: public static final String SIG_DOUBLE = "D";
055: public static final char SIGC_ARRAY = 91;
056: public static final String SIG_ARRAY = "[";
057: public static final char SIGC_CLASS = 76;
058: public static final String SIG_CLASS = "L";
059: public static final char SIGC_METHOD = 40;
060: public static final String SIG_METHOD = "(";
061: public static final char SIGC_ENDCLASS = 59;
062: public static final String SIG_ENDCLASS = ";";
063: public static final char SIGC_ENDMETHOD = 41;
064: public static final String SIG_ENDMETHOD = ")";
065: public static final char SIGC_PACKAGE = 47;
066: public static final String SIG_PACKAGE = "/";
067: public static final int JAVA_MAGIC = 0xcafebabe;
068: public static final int JAVA_VERSION = 45;
069: public static final int JAVA_MINOR_VERSION = 3;
070: public static final int CONSTANT_UTF8 = 1;
071: public static final int CONSTANT_UNICODE = 2;
072: public static final int CONSTANT_INTEGER = 3;
073: public static final int CONSTANT_FLOAT = 4;
074: public static final int CONSTANT_LONG = 5;
075: public static final int CONSTANT_DOUBLE = 6;
076: public static final int CONSTANT_CLASS = 7;
077: public static final int CONSTANT_STRING = 8;
078: public static final int CONSTANT_FIELD = 9;
079: public static final int CONSTANT_METHOD = 10;
080: public static final int CONSTANT_INTERFACEMETHOD = 11;
081: public static final int CONSTANT_NAMEANDTYPE = 12;
082: public static final int ACC_PUBLIC = 1;
083: public static final int ACC_PRIVATE = 2;
084: public static final int ACC_PROTECTED = 4;
085: public static final int ACC_STATIC = 8;
086: public static final int ACC_FINAL = 16;
087: public static final int ACC_SYNCHRONIZED = 32;
088: public static final int ACC_VOLATILE = 64;
089: public static final int ACC_TRANSIENT = 128;
090: public static final int ACC_NATIVE = 256;
091: public static final int ACC_INTERFACE = 512;
092: public static final int ACC_ABSTRACT = 1024;
093: public static final int ACC_SUPER = 32;
094: public static final int T_CLASS = 2;
095: public static final int T_BOOLEAN = 4;
096: public static final int T_CHAR = 5;
097: public static final int T_FLOAT = 6;
098: public static final int T_DOUBLE = 7;
099: public static final int T_BYTE = 8;
100: public static final int T_SHORT = 9;
101: public static final int T_INT = 10;
102: public static final int T_LONG = 11;
103: public static final int T_VOID = 021;
104:
105: }
|