From 4060490e85d1f9250f5e22c39c456920e19be317 Mon Sep 17 00:00:00 2001 From: Ben Gruver Date: Fri, 9 Nov 2012 23:56:13 -0800 Subject: [PATCH] Get rid of old commented code block for methods in ClassDefinition --- .../jf/baksmali/Adaptors/ClassDefinition.java | 69 ------------------- 1 file changed, 69 deletions(-) diff --git a/baksmali/src/main/java/org/jf/baksmali/Adaptors/ClassDefinition.java b/baksmali/src/main/java/org/jf/baksmali/Adaptors/ClassDefinition.java index c783f7d6..069564fc 100644 --- a/baksmali/src/main/java/org/jf/baksmali/Adaptors/ClassDefinition.java +++ b/baksmali/src/main/java/org/jf/baksmali/Adaptors/ClassDefinition.java @@ -247,73 +247,4 @@ public class ClassDefinition { } } } - - //TODO: uncomment - /*private void writeDirectMethods(IndentingWriter writer) throws IOException { - if (classDataItem == null) { - return; - } - - List directMethods = classDataItem.getDirectMethods(); - if (directMethods.size() == 0) { - return; - } - - writer.write("\n\n"); - writer.write("# direct methods\n"); - writeMethods(writer, directMethods); - } - - private void writeVirtualMethods(IndentingWriter writer) throws IOException { - if (classDataItem == null) { - return; - } - - List virtualMethods = classDataItem.getVirtualMethods(); - - if (virtualMethods.size() == 0) { - return; - } - - writer.write("\n\n"); - writer.write("# virtual methods\n"); - writeMethods(writer, virtualMethods); - } - - private void writeMethods(IndentingWriter writer, List methods) throws IOException { - for (int i=0; i 0) { - writer.write('\n'); - } - - AnnotationSetItem methodAnnotations = null; - AnnotationSetRefList parameterAnnotations = null; - AnnotationDirectoryItem annotations = classDefItem.getAnnotations(); - if (annotations != null) { - methodAnnotations = annotations.getMethodAnnotations(method.method); - parameterAnnotations = annotations.getParameterAnnotations(method.method); - } - - IndentingWriter methodWriter = writer; - // the encoded methods are sorted, so we just have to compare with the previous one to detect duplicates - if (i > 0 && method.equals(methods.get(i-1))) { - methodWriter = new CommentingIndentingWriter(writer, "#"); - methodWriter.write("Ignoring method with duplicate signature\n"); - System.err.println(String.format("Warning: class %s has duplicate method %s, Ignoring.", - classDefItem.getClassType().getTypeDescriptor(), method.method.getShortMethodString())); - } - - MethodDefinition methodDefinition = new MethodDefinition(method); - methodDefinition.writeTo(methodWriter, methodAnnotations, parameterAnnotations); - - ValidationException validationException = methodDefinition.getValidationException(); - if (validationException != null) { - System.err.println(String.format("Error while disassembling method %s. Continuing.", - method.method.getMethodString())); - validationException.printStackTrace(System.err); - this.validationErrors = true; - } - } - }*/ }