1 19 20 package jode.decompiler; 21 import jode.type.Type; 22 import jode.bytecode.LocalVariableInfo; 23 24 public class LocalVariableTable { 25 LocalVariableRangeList[] locals; 26 27 public LocalVariableTable(int maxLocals, LocalVariableInfo[] lvt) { 28 locals = new LocalVariableRangeList[maxLocals]; 29 for (int i=0; i < maxLocals; i++) 30 locals[i] = new LocalVariableRangeList(); 31 32 for (int i=0; i<lvt.length; i++) 33 locals[lvt[i].slot].addLocal(lvt[i].start.getAddr(), 34 lvt[i].end.getAddr(), 35 lvt[i].name, Type.tType(lvt[i].type)); 36 } 37 38 public LocalVarEntry getLocal(int slot, int addr) 39 throws ArrayIndexOutOfBoundsException 40 { 41 return locals[slot].getInfo(addr); 42 } 43 } 44 | Popular Tags |