From 4155cb3a0265cc2b24be7ece87b4e380c6a09936 Mon Sep 17 00:00:00 2001 From: jochen Date: Tue, 27 Apr 1999 18:15:40 +0000 Subject: [PATCH] MethodInfo.getType() returns String doTransformations renames method. write() removed, since bytecode handles this git-svn-id: https://svn.code.sf.net/p/jode/code/trunk@645 379699f6-c40d-0410-875b-85095c16579e --- jode/jode/obfuscator/FieldIdentifier.java | 35 +++-------------------- 1 file changed, 4 insertions(+), 31 deletions(-) diff --git a/jode/jode/obfuscator/FieldIdentifier.java b/jode/jode/obfuscator/FieldIdentifier.java index 4e1e011..28fd3c6 100644 --- a/jode/jode/obfuscator/FieldIdentifier.java +++ b/jode/jode/obfuscator/FieldIdentifier.java @@ -86,7 +86,7 @@ public class FieldIdentifier extends Identifier{ } public String getType() { - return info.getType().getTypeSignature(); + return info.getType(); } public boolean isNotConstant() { @@ -144,35 +144,8 @@ public class FieldIdentifier extends Identifier{ return false; } - int nameIndex; - int descriptorIndex; - int constvalIndex; - int constvalcontentIndex; - - public void fillConstantPool(GrowableConstantPool gcp) - throws ClassFormatException { - nameIndex = gcp.putUTF(getAlias()); - descriptorIndex = gcp.putUTF(clazz.bundle.getTypeAlias(getType())); - constvalIndex = 0; - if (info.getConstant() != null) { - constvalIndex = gcp.putUTF("ConstantValue"); - if (info.getType().stackSize() == 2) - constvalcontentIndex = gcp.putLongConstant(info.getConstant()); - else - constvalcontentIndex = gcp.putConstant(info.getConstant()); - } - } - - public void write(DataOutputStream out) throws IOException { - out.writeShort(info.getModifiers()); - out.writeShort(nameIndex); - out.writeShort(descriptorIndex); - if (constvalIndex != 0) { - out.writeShort(1); // number of Attributes - out.writeShort(constvalIndex); - out.writeInt(2); // length of Attribute - out.writeShort(constvalcontentIndex); - } else - out.writeShort(0); + public void doTransformations() { + info.setName(getAlias()); + info.setType(clazz.bundle.getTypeAlias(info.getType())); } }