1 26 package com.yworks.yguard.obf.classfile; 27 28 import java.io.*; 29 import java.util.*; 30 31 36 public class LineNumberTableAttrInfo extends AttrInfo 37 { 38 40 41 private int u2lineNumberTableLength; 43 private LineNumberInfo[] lineNumberTable; 44 45 46 48 49 protected LineNumberTableAttrInfo(ClassFile cf, int attrNameIndex, int attrLength) 51 { 52 super(cf, attrNameIndex, attrLength); 53 } 54 55 56 protected String getAttrName() 57 { 58 return ATTR_LineNumberTable; 59 } 60 61 public LineNumberInfo[] getLineNumberTable(){ 62 return lineNumberTable; 63 } 64 65 public void setLineNumberTable(LineNumberInfo[] table){ 66 this.lineNumberTable = table; 67 this.u2lineNumberTableLength = this.lineNumberTable.length; 68 this.u4attrLength = 2 + 4 * u2lineNumberTableLength; 69 } 70 71 72 protected void readInfo(DataInput din) throws java.io.IOException 73 { 74 u2lineNumberTableLength = din.readUnsignedShort(); 75 lineNumberTable = new LineNumberInfo[u2lineNumberTableLength]; 76 for (int i = 0; i < u2lineNumberTableLength; i++) 77 { 78 lineNumberTable[i] = LineNumberInfo.create(din); 79 } 80 } 81 82 83 public void writeInfo(DataOutput dout) throws java.io.IOException 84 { 85 dout.writeShort(u2lineNumberTableLength); 86 for (int i = 0; i < u2lineNumberTableLength; i++) 87 { 88 lineNumberTable[i].write(dout); 89 } 90 } 91 } 92 93 | Popular Tags |