From 56d16a23f6d9a69eef41586f93c2a09b72e21952 Mon Sep 17 00:00:00 2001 From: "JesusFreke@JesusFreke.com" Date: Sun, 21 Jun 2009 20:12:57 +0000 Subject: [PATCH] Misc cleanup/refactoring git-svn-id: https://smali.googlecode.com/svn/trunk@205 55b6fa8a-2a1e-11de-a435-ffa8d773f76a --- .../java/org/jf/baksmali/Adaptors/MethodDefinition.java | 6 +----- .../org/jf/baksmali/Adaptors/Reference/MethodReference.java | 2 +- dexlib/src/main/java/org/jf/dexlib/MethodIdItem.java | 4 ++-- 3 files changed, 4 insertions(+), 8 deletions(-) diff --git a/baksmali/src/main/java/org/jf/baksmali/Adaptors/MethodDefinition.java b/baksmali/src/main/java/org/jf/baksmali/Adaptors/MethodDefinition.java index cb955253..d73b4e56 100644 --- a/baksmali/src/main/java/org/jf/baksmali/Adaptors/MethodDefinition.java +++ b/baksmali/src/main/java/org/jf/baksmali/Adaptors/MethodDefinition.java @@ -55,12 +55,8 @@ public class MethodDefinition { this.parameterAnnotations = parameterAnnotations; } - private String methodName = null; public String getMethodName() { - if (methodName == null) { - methodName = methodIdItem.getMethodName(); - } - return methodName; + return methodIdItem.getMethodName().getStringValue(); } private List accessFlags = null; diff --git a/baksmali/src/main/java/org/jf/baksmali/Adaptors/Reference/MethodReference.java b/baksmali/src/main/java/org/jf/baksmali/Adaptors/Reference/MethodReference.java index 84533f37..cc0d5b77 100644 --- a/baksmali/src/main/java/org/jf/baksmali/Adaptors/Reference/MethodReference.java +++ b/baksmali/src/main/java/org/jf/baksmali/Adaptors/Reference/MethodReference.java @@ -40,7 +40,7 @@ public class MethodReference extends Reference { } public String getMethodName() { - return item.getMethodName(); + return item.getMethodName().getStringValue(); } public String getPrototype() { diff --git a/dexlib/src/main/java/org/jf/dexlib/MethodIdItem.java b/dexlib/src/main/java/org/jf/dexlib/MethodIdItem.java index f51022eb..22cc0fd0 100644 --- a/dexlib/src/main/java/org/jf/dexlib/MethodIdItem.java +++ b/dexlib/src/main/java/org/jf/dexlib/MethodIdItem.java @@ -79,8 +79,8 @@ public class MethodIdItem extends IndexedItem { return prototypeReferenceField.getReference(); } - public String getMethodName() { - return methodNameReferenceField.getReference().getStringValue(); + public StringIdItem getMethodName() { + return methodNameReferenceField.getReference(); } public int getParameterRegisterCount(boolean isStatic) {