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