1 26 package com.yworks.yguard.obf.classfile; 27 28 import java.io.*; 29 import java.util.*; 30 31 36 public class SignatureAttrInfo extends AttrInfo 37 { 38 40 41 private int u2signatureIndex; 43 44 45 47 48 protected SignatureAttrInfo(ClassFile cf, int attrNameIndex, int attrLength) 50 { 51 super(cf, attrNameIndex, attrLength); 52 } 53 54 55 protected String getAttrName() 56 { 57 return ATTR_Signature; 58 } 59 60 protected int getSignatureIndex(){ 61 return this.u2signatureIndex; 62 } 63 64 protected void setSignatureIndex(int index){ 65 this.u2signatureIndex = index; 66 } 67 68 69 protected void markUtf8RefsInInfo(ConstantPool pool) 70 { 71 pool.incRefCount(u2signatureIndex); 72 } 73 74 75 protected void readInfo(DataInput din) throws java.io.IOException 76 { 77 u2signatureIndex = din.readUnsignedShort(); 78 } 79 80 81 public void writeInfo(DataOutput dout) throws java.io.IOException 82 { 83 dout.writeShort(u2signatureIndex); 84 } 85 86 public String toString() { 87 return super.toString() + ((Utf8CpInfo)owner.getCpEntry(u2signatureIndex)).getString(); 88 } 89 } 90 91 | Popular Tags |