diff --git a/jode/jode/decompiler/LocalVariableTable.java b/jode/jode/decompiler/LocalVariableTable.java index 7b45d25..232ea5a 100644 --- a/jode/jode/decompiler/LocalVariableTable.java +++ b/jode/jode/decompiler/LocalVariableTable.java @@ -21,49 +21,22 @@ package jode.decompiler; import java.io.*; import jode.Decompiler; import jode.type.Type; -import jode.bytecode.AttributeInfo; -import jode.bytecode.ConstantPool; +import jode.bytecode.LocalVariableInfo; public class LocalVariableTable { LocalVariableRangeList[] locals; - public LocalVariableTable(int size, ConstantPool constantPool, - AttributeInfo attr) { - - locals = new LocalVariableRangeList[size]; - for (int i=0; i") || methodName.equals(""); - this.isSynthetic = (minfo.findAttribute("Synthetic") != null); - this.isDeprecated = (minfo.findAttribute("Deprecated") != null); + this.isSynthetic = minfo.isSynthetic(); + this.isDeprecated = minfo.isDeprecated(); - AttributeInfo codeattr = minfo.findAttribute("Code"); - if (codeattr != null) { - code = new CodeAnalyzer(this, minfo, codeattr, imports); - } - - AttributeInfo excattr = minfo.findAttribute("Exceptions"); + code = new CodeAnalyzer(this, minfo, imports); + String[] excattr = minfo.getExceptions(); if (excattr == null) { exceptions = new Type[0]; } else { - DataInputStream stream = new DataInputStream - (new ByteArrayInputStream(excattr.getContents())); - try { - int throwCount = stream.readUnsignedShort(); - this.exceptions = new Type[throwCount]; - for (int t=0; t< throwCount; t++) { - int idx = stream.readUnsignedShort(); - exceptions[t] = Type.tClass(classAnalyzer.getConstantPool() - .getClassName(idx)); - } - } catch (IOException ex) { - throw new AssertError("exception attribute too long?"); - } + int excCount = excattr.length; + this.exceptions = new Type[excCount]; + for (int i=0; i< excCount; i++) + exceptions[i] = Type.tClass(excattr[i]); } }