From 54f3f0c2b02914f660cbdf287ce50fea33a2ebe3 Mon Sep 17 00:00:00 2001 From: jochen Date: Wed, 28 Apr 1999 18:10:03 +0000 Subject: [PATCH] printType, call type.guessName for abstract methods git-svn-id: https://svn.code.sf.net/p/jode/code/trunk@704 379699f6-c40d-0410-875b-85095c16579e --- jode/jode/decompiler/MethodAnalyzer.java | 40 ++++++++++++++++-------- 1 file changed, 27 insertions(+), 13 deletions(-) diff --git a/jode/jode/decompiler/MethodAnalyzer.java b/jode/jode/decompiler/MethodAnalyzer.java index c7b2b06..a085632 100644 --- a/jode/jode/decompiler/MethodAnalyzer.java +++ b/jode/jode/decompiler/MethodAnalyzer.java @@ -196,24 +196,38 @@ public class MethodAnalyzer implements Analyzer { else { if (isConstructor) writer.print(imports.getClassString(classAnalyzer.getClazz())); - else - writer.print(getReturnType().toString() - + " " + methodName); + else { + writer.printType(getReturnType()); + writer.print(" " + methodName); + } writer.print("("); Type[] paramTypes = methodType.getParameterTypes(); int offset = isStatic()?0:1; + + LocalInfo[] param = new LocalInfo[paramTypes.length]; + for (int i=0; i0) writer.print(", "); - LocalInfo li; - if (code == null) { - li = new LocalInfo(offset); - li.setType(paramTypes[i]); - li.makeNameUnique(); - } else - li = code.getParamInfo(offset); - writer.print(li.getType().toString()+" "+li.getName()); - offset++; + writer.printType(param[i].getType()); + writer.print(" "+param[i].getName()); } writer.print(")"); } @@ -223,7 +237,7 @@ public class MethodAnalyzer implements Analyzer { for (int i= 0; i< exceptions.length; i++) { if (i > 0) writer.print(", "); - writer.print(exceptions[i].toString()); + writer.printType(exceptions[i]); } } if (code != null) {