1 26 package com.yworks.yguard.obf.classfile; 27 28 import java.io.*; 29 import java.util.*; 30 31 36 public class ClassCpInfo extends CpInfo 37 { 38 40 41 private int u2nameIndex; 43 44 45 47 48 protected ClassCpInfo() 50 { 51 super(CONSTANT_Class); 52 } 53 54 55 protected int getNameIndex() {return u2nameIndex;} 56 57 58 protected void setNameIndex(int index) {u2nameIndex = index;} 59 60 61 protected void markUtf8Refs(ConstantPool pool) 62 { 63 pool.incRefCount(u2nameIndex); 64 } 65 66 67 protected void readInfo(DataInput din) throws java.io.IOException 68 { 69 u2nameIndex = din.readUnsignedShort(); 70 } 71 72 73 protected void writeInfo(DataOutput dout) throws java.io.IOException 74 { 75 dout.writeShort(u2nameIndex); 76 } 77 78 79 public void dump(PrintWriter pw, ClassFile cf) 80 { 81 pw.println(" Class: " + ((Utf8CpInfo)cf.getCpEntry(u2nameIndex)).getString()); 82 } 83 } 84 | Popular Tags |