1 7 package org.gjt.jclasslib.structures.attributes; 8 9 import org.gjt.jclasslib.structures.AttributeInfo; 10 import org.gjt.jclasslib.structures.InvalidByteCodeException; 11 12 import java.io.DataOutput ; 13 import java.io.IOException ; 14 15 21 public abstract class LocalVariableCommonAttribute extends AttributeInfo { 22 protected static final int INITIAL_LENGTH = 2; 23 24 protected LocalVariableCommonEntry[] localVariableTable; 25 26 32 public LocalVariableCommonEntry[] getLocalVariableEntries() { 33 return localVariableTable; 34 } 35 36 42 public void setLocalVariableEntries(LocalVariableCommonEntry[] localVariableEntries) { 43 this.localVariableTable = localVariableEntries; 44 } 45 46 public void write(DataOutput out) 47 throws InvalidByteCodeException, IOException { 48 49 super.write(out); 50 51 int localVariableTableLength = getLength(localVariableTable); 52 out.writeShort(localVariableTableLength); 53 for (int i = 0; i < localVariableTableLength; i++) { 54 localVariableTable[i].write(out); 55 } 56 57 if (debug) debug("wrote "); 58 } 59 } 60 | Popular Tags |