| 1 package com.yworks.yguard.obf.classfile; 2 3 import java.io.DataInput ; 4 import java.io.DataOutput ; 5 6 10 public class StackMapTableAttrInfo extends AttrInfo 11 { 12 14 15 private int u2NumberOfEntries; 17 private StackMapFrameInfo[] entries; 18 19 20 22 23 protected StackMapTableAttrInfo(ClassFile cf, int attrNameIndex, int attrLength) 25 { 26 super(cf, attrNameIndex, attrLength); 27 } 28 29 30 protected String getAttrName() 31 { 32 return ATTR_StackMapTable; 33 } 34 35 36 protected StackMapFrameInfo[] getEntries() 37 { 38 return entries; 39 } 40 41 42 protected void markUtf8RefsInInfo(ConstantPool pool) 43 { 44 for (int i = 0; i < entries.length; i++) 45 { 46 entries[i].markUtf8Refs(pool); 47 } 48 } 49 50 51 protected void readInfo(DataInput din) throws java.io.IOException  52 { 53 u2NumberOfEntries = din.readUnsignedShort(); 54 entries = new StackMapFrameInfo[u2NumberOfEntries]; 55 for (int i = 0; i < u2NumberOfEntries; i++) 56 { 57 entries[i] = StackMapFrameInfo.create(din); 58 } 59 } 60 61 62 public void writeInfo(DataOutput dout) throws java.io.IOException  63 { 64 dout.writeShort(u2NumberOfEntries); 65 for (int i = 0; i < u2NumberOfEntries; i++) 66 { 67 entries[i].write(dout); 68 } 69 } 70 71 } 72 | Popular Tags |