git-svn-id: https://svn.code.sf.net/p/jode/code/trunk@126 379699f6-c40d-0410-875b-85095c16579e
stable
jochen 26 years ago
parent f712ecf8bd
commit cb60fb2b28
  1. 9
      jode/jode/decompiler/ClassAnalyzer.java
  2. 7
      jode/jode/decompiler/FieldAnalyzer.java

@ -72,12 +72,11 @@ public class ClassAnalyzer implements Analyzer {
int numFields = 0; int numFields = 0;
int i = 0; int i = 0;
Field[] fields = clazz.getDeclaredFields(); analyzers = new Analyzer[classType.getFieldCount() +
analyzers = new Analyzer[fields.length +
classType.getMethodCount()]; classType.getMethodCount()];
for (int j=0; j< fields.length; j++) { for (gnu.bytecode.Field field = classType.getFields();
analyzers[i] = new FieldAnalyzer(this, fields[j], env); field != null; field = field.getNext()) {
analyzers[i] = new FieldAnalyzer(this, field, env);
analyzers[i++].analyze(); analyzers[i++].analyze();
} }

@ -31,13 +31,14 @@ public class FieldAnalyzer implements Analyzer {
String fieldName; String fieldName;
Expression constant; Expression constant;
public FieldAnalyzer(ClassAnalyzer cla, Field fd, JodeEnvironment e) public FieldAnalyzer(ClassAnalyzer cla, gnu.bytecode.Field fd,
JodeEnvironment e)
{ {
clazz = cla; clazz = cla;
env = e; env = e;
modifiers = fd.getModifiers(); modifiers = Spy.getModifiers(fd);
type = Type.tType(fd.getType()); type = Type.tType(fd.getSignature());
fieldName = fd.getName(); fieldName = fd.getName();
constant = null; constant = null;

Loading…
Cancel
Save