📄 constants.java
字号:
/*
* Author jyang Created on 2006-4-3 14:41:07
*/
package com.jasml.classes;
import java.util.HashSet;
/*
* This class defines several common used constants.
*/
public class Constants {
public final static String LINE_SEPARATER = "\r\n";
/**
* Tags in constant pool to denote type of constant.
*/
public final static byte CONSTANT_Utf8 = 1;
public final static byte CONSTANT_Integer = 3;
public final static byte CONSTANT_Float = 4;
public final static byte CONSTANT_Long = 5;
public final static byte CONSTANT_Double = 6;
public final static byte CONSTANT_Class = 7;
public final static byte CONSTANT_Fieldref = 9;
public final static byte CONSTANT_String = 8;
public final static byte CONSTANT_Methodref = 10;
public final static byte CONSTANT_InterfaceMethodref = 11;
public final static byte CONSTANT_NameAndType = 12;
// these are names mapping to the constant tags.
public final static String[] CONSTANT_NAMES = { "", "CONSTANT_Utf8", "", "CONSTANT_Integer", "CONSTANT_Float", "CONSTANT_Long",
"CONSTANT_Double", "CONSTANT_Class", "CONSTANT_String", "CONSTANT_Fieldref", "CONSTANT_Methodref", "CONSTANT_InterfaceMethodref",
"CONSTANT_NameAndType" };
// these are attribute names and tags, the tags is not defined by jvm but
// used only internally.
public final static String[] ATTRIBUTE_NAMES = { "", "SourceFile", "ConstantValue", "Code", "Exceptions", "InnerClasses", "Synthetic",
"LineNumberTable", "LocalVariableTable", "Deprecated" };
public final static byte ATTRIBUTE_SourceFile = 1;
public final static byte ATTRIBUTE_ConstantValue = 2;
public final static byte ATTRIBUTE_Code = 3;
public final static byte ATTRIBUTE_Exceptions = 4;
public final static byte ATTRIBUTE_InnerClasses = 5;
public final static byte ATTRIBUTE_Synthetic = 6;
public final static byte ATTRIBUTE_LineNumberTable = 7;
public final static byte ATTRIBUTE_LocalVariableTable = 8;
public final static byte ATTRIBUTE_Deprecated = 9;
// Bellow are access flags for fields
public final static short ACCESS_FLAG_FIELD_PUBLIC = 0x0001;
public final static short ACCESS_FLAG_FIELD_PRIVATE = 0x0002;
public final static short ACCESS_FLAG_FIELD_PROTECTED = 0x0004;
public final static short ACCESS_FLAG_FIELD_STATIC = 0x0008;
public final static short ACCESS_FLAG_FIELD_FINAL = 0x0010;
public final static short ACCESS_FLAG_FIELD_VOLATILE = 0x0040;
public final static short ACCESS_FLAG_FIELD_TRANSIENT = 0x0080;
// Bellow are access flags for methods
public final static short ACCESS_FLAG_METHOD_PUBLIC = 0x0001;
public final static short ACCESS_FLAG_METHOD_PRIVATE = 0x0002;
public final static short ACCESS_FLAG_METHOD_PROTECTED = 0x0004;
public final static short ACCESS_FLAG_METHOD_STATIC = 0x0008;
public final static short ACCESS_FLAG_METHOD_FINAL = 0x0010;
public final static short ACCESS_FLAG_METHOD_SYNCHRONIZED = 0x0020;
public final static short ACCESS_FLAG_METHOD_NATIVE = 0x0100;
public final static short ACCESS_FLAG_METHOD_ABSTRACT = 0x0400;
public final static short ACCESS_FLAG_METHOD_STRICT = 0x0800;
// Bellow are access flags for classes
public final static short ACCESS_FLAG_CLASS_PUBLIC = 0x0001;
public final static short ACCESS_FLAG_CLASS_FINAL = 0x0010;
public final static short ACCESS_FLAG_CLASS_SUPER = 0x0020;
public final static short ACCESS_FLAG_CLASS_INTERFACE = 0x0200;
public final static short ACCESS_FLAG_CLASS_ABSTRACT = 0x0400;
/*
* JVM opcodes.
*/
public static final byte NOP = (byte) 0;
public static final byte ACONST_NULL = (byte) 1;
public static final byte ICONST_M1 = (byte) 2;
public static final byte ICONST_0 = (byte) 3;
public static final byte ICONST_1 = (byte) 4;
public static final byte ICONST_2 = (byte) 5;
public static final byte ICONST_3 = (byte) 6;
public static final byte ICONST_4 = (byte) 7;
public static final byte ICONST_5 = (byte) 8;
public static final byte LCONST_0 = (byte) 9;
public static final byte LCONST_1 = (byte) 10;
public static final byte FCONST_0 = (byte) 11;
public static final byte FCONST_1 = (byte) 12;
public static final byte FCONST_2 = (byte) 13;
public static final byte DCONST_0 = (byte) 14;
public static final byte DCONST_1 = (byte) 15;
public static final byte BIPUSH = (byte) 16;
public static final byte SIPUSH = (byte) 17;
public static final byte LDC = (byte) 18;
public static final byte LDC_W = (byte) 19;
public static final byte LDC2_W = (byte) 20;
public static final byte ILOAD = (byte) 21;
public static final byte LLOAD = (byte) 22;
public static final byte FLOAD = (byte) 23;
public static final byte DLOAD = (byte) 24;
public static final byte ALOAD = (byte) 25;
public static final byte ILOAD_0 = (byte) 26;
public static final byte ILOAD_1 = (byte) 27;
public static final byte ILOAD_2 = (byte) 28;
public static final byte ILOAD_3 = (byte) 29;
public static final byte LLOAD_0 = (byte) 30;
public static final byte LLOAD_1 = (byte) 31;
public static final byte LLOAD_2 = (byte) 32;
public static final byte LLOAD_3 = (byte) 33;
public static final byte FLOAD_0 = (byte) 34;
public static final byte FLOAD_1 = (byte) 35;
public static final byte FLOAD_2 = (byte) 36;
public static final byte FLOAD_3 = (byte) 37;
public static final byte DLOAD_0 = (byte) 38;
public static final byte DLOAD_1 = (byte) 39;
public static final byte DLOAD_2 = (byte) 40;
public static final byte DLOAD_3 = (byte) 41;
public static final byte ALOAD_0 = (byte) 42;
public static final byte ALOAD_1 = (byte) 43;
public static final byte ALOAD_2 = (byte) 44;
public static final byte ALOAD_3 = (byte) 45;
public static final byte IALOAD = (byte) 46;
public static final byte LALOAD = (byte) 47;
public static final byte FALOAD = (byte) 48;
public static final byte DALOAD = (byte) 49;
public static final byte AALOAD = (byte) 50;
public static final byte BALOAD = (byte) 51;
public static final byte CALOAD = (byte) 52;
public static final byte SALOAD = (byte) 53;
public static final byte ISTORE = (byte) 54;
public static final byte LSTORE = (byte) 55;
public static final byte FSTORE = (byte) 56;
public static final byte DSTORE = (byte) 57;
public static final byte ASTORE = (byte) 58;
public static final byte ISTORE_0 = (byte) 59;
public static final byte ISTORE_1 = (byte) 60;
public static final byte ISTORE_2 = (byte) 61;
public static final byte ISTORE_3 = (byte) 62;
public static final byte LSTORE_0 = (byte) 63;
public static final byte LSTORE_1 = (byte) 64;
public static final byte LSTORE_2 = (byte) 65;
public static final byte LSTORE_3 = (byte) 66;
public static final byte FSTORE_0 = (byte) 67;
public static final byte FSTORE_1 = (byte) 68;
public static final byte FSTORE_2 = (byte) 69;
public static final byte FSTORE_3 = (byte) 70;
public static final byte DSTORE_0 = (byte) 71;
public static final byte DSTORE_1 = (byte) 72;
public static final byte DSTORE_2 = (byte) 73;
public static final byte DSTORE_3 = (byte) 74;
public static final byte ASTORE_0 = (byte) 75;
public static final byte ASTORE_1 = (byte) 76;
public static final byte ASTORE_2 = (byte) 77;
public static final byte ASTORE_3 = (byte) 78;
public static final byte IASTORE = (byte) 79;
public static final byte LASTORE = (byte) 80;
public static final byte FASTORE = (byte) 81;
public static final byte DASTORE = (byte) 82;
public static final byte AASTORE = (byte) 83;
public static final byte BASTORE = (byte) 84;
public static final byte CASTORE = (byte) 85;
public static final byte SASTORE = (byte) 86;
public static final byte POP = (byte) 87;
public static final byte POP2 = (byte) 88;
public static final byte DUP = (byte) 89;
public static final byte DUP_X1 = (byte) 90;
public static final byte DUP_X2 = (byte) 91;
public static final byte DUP2 = (byte) 92;
public static final byte DUP2_X1 = (byte) 93;
public static final byte DUP2_X2 = (byte) 94;
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -