cache name and type

git-svn-id: https://svn.code.sf.net/p/jode/code/trunk@715 379699f6-c40d-0410-875b-85095c16579e
stable
jochen 26 years ago
parent e0ca7fe5be
commit 6e4d05fee5
  1. 10
      jode/jode/obfuscator/FieldIdentifier.java

@ -26,6 +26,8 @@ import java.util.*;
public class FieldIdentifier extends Identifier{ public class FieldIdentifier extends Identifier{
FieldInfo info; FieldInfo info;
ClassIdentifier clazz; ClassIdentifier clazz;
String name;
String type;
/** /**
* This field tells if the value is not constant. It is initially * This field tells if the value is not constant. It is initially
* set to false, and if a write to that field is found, it is set * set to false, and if a write to that field is found, it is set
@ -42,6 +44,8 @@ public class FieldIdentifier extends Identifier{
public FieldIdentifier(ClassIdentifier clazz, FieldInfo info) { public FieldIdentifier(ClassIdentifier clazz, FieldInfo info) {
super(info.getName()); super(info.getName());
this.name = info.getName();
this.type = info.getType();
this.info = info; this.info = info;
this.clazz = clazz; this.clazz = clazz;
this.constant = info.getConstant(); this.constant = info.getConstant();
@ -82,11 +86,11 @@ public class FieldIdentifier extends Identifier{
} }
public String getName() { public String getName() {
return info.getName(); return name;
} }
public String getType() { public String getType() {
return info.getType(); return type;
} }
public boolean isNotConstant() { public boolean isNotConstant() {
@ -146,6 +150,6 @@ public class FieldIdentifier extends Identifier{
public void doTransformations() { public void doTransformations() {
info.setName(getAlias()); info.setName(getAlias());
info.setType(clazz.bundle.getTypeAlias(info.getType())); info.setType(clazz.bundle.getTypeAlias(type));
} }
} }

Loading…
Cancel
Save