1 30 31 package jbet; 32 import java.io.*; 33 import java.util.*; 34 35 45 abstract class CPInterface { 46 static final String [] mnemonic = { "", "Utf8", "", "Integer", "Float", 47 "Long", "Double", "Class", "String", 48 "Fieldref", "Methodref", 49 "InterfaceMethodref", "NameAndType" }; 50 final static int CONSTANT_Utf8 = 1; 51 final static int CONSTANT_Integer = 3; 52 final static int CONSTANT_Float = 4; 53 final static int CONSTANT_Long = 5; 54 final static int CONSTANT_Double = 6; 55 final static int CONSTANT_Class = 7; 56 final static int CONSTANT_String = 8; 57 final static int CONSTANT_Fieldref = 9; 58 final static int CONSTANT_Methodref = 10; 59 final static int CONSTANT_InterfaceMethodref = 11; 60 final static int CONSTANT_NameAndType = 12; 61 62 63 abstract void printout (LineWriter out); 64 abstract int tagAt (int i); 65 abstract int poolCount(); 66 abstract CpEntry elementAt (int i); 67 68 74 abstract int integerAt (int index) throws ClassFileException ; 75 abstract float floatAt (int index) throws ClassFileException ; 76 abstract long longAt (int index) throws ClassFileException ; 77 abstract double doubleAt (int index) throws ClassFileException ; 78 abstract String utf8At (int index) throws ClassFileException ; 79 abstract String stringAt (int index) throws ClassFileException ; 80 abstract CpNameAndType cpNameAndTypeAt (int index) throws ClassFileException; 81 abstract CpInteger cpIntegerAt (int index) throws ClassFileException ; 82 abstract CpFloat cpFloatAt (int index) throws ClassFileException ; 83 abstract CpLong cpLongAt (int index) throws ClassFileException ; 84 abstract CpDouble cpDoubleAt (int index) throws ClassFileException ; 85 abstract CpUtf8 cpUtf8At (int index) throws ClassFileException ; 86 abstract CpClass cpClassAt (int index) throws ClassFileException ; 87 abstract CpString cpStringAt (int index) throws ClassFileException ; 88 abstract CpMethodRef cpMethodRefAt (int index) throws ClassFileException ; 89 abstract CpFieldRef cpFieldRefAt (int index) throws ClassFileException ; 90 91 98 abstract int internUtf8 (String s) ; 99 abstract int internClass (String s) ; 100 abstract int internString (String s) ; 101 abstract int internMethodRef (String cname, String mname, 102 Descriptor type) ; 103 abstract int internFieldRef (String cname, String mname, 104 Type type) ; 105 abstract int internInterfaceMethodRef (String cname, String mname, 106 Descriptor type); 107 abstract int internInteger (int i) ; 108 abstract int internFloat (float i) ; 109 abstract int internLong (long i) ; 110 abstract int internDouble (double i) ; 111 112 } 113 | Popular Tags |