From 2ecb19a3d9c9232483cb67ebc0fe84a8d2508272 Mon Sep 17 00:00:00 2001 From: jochen Date: Wed, 14 Jul 1999 15:57:13 +0000 Subject: [PATCH] imports cleaned up git-svn-id: https://svn.code.sf.net/p/jode/code/trunk@1063 379699f6-c40d-0410-875b-85095c16579e --- jode/jode/Decompiler.java | 12 ++++++++++-- jode/jode/decompiler/ClassAnalyzer.java | 18 +++++++++--------- jode/jode/decompiler/FieldAnalyzer.java | 9 +++++---- jode/jode/decompiler/ImportHandler.java | 5 ++++- 4 files changed, 28 insertions(+), 16 deletions(-) diff --git a/jode/jode/Decompiler.java b/jode/jode/Decompiler.java index 2194340..3614f4a 100644 --- a/jode/jode/Decompiler.java +++ b/jode/jode/Decompiler.java @@ -18,13 +18,21 @@ */ package jode; -import java.io.*; import jode.bytecode.ClassInfo; import jode.bytecode.SearchPath; import jode.bytecode.InnerClassInfo; -import jode.decompiler.*; +import jode.decompiler.ClassAnalyzer; +import jode.decompiler.ImportHandler; +import jode.decompiler.TabbedPrintWriter; + +import java.io.BufferedOutputStream; +import java.io.File; +import java.io.FileOutputStream; +import java.io.IOException; +import java.io.PrintWriter; import java.util.zip.ZipOutputStream; import java.util.zip.ZipEntry; + import gnu.getopt.LongOpt; import gnu.getopt.Getopt; diff --git a/jode/jode/decompiler/ClassAnalyzer.java b/jode/jode/decompiler/ClassAnalyzer.java index 2434843..c81b555 100644 --- a/jode/jode/decompiler/ClassAnalyzer.java +++ b/jode/jode/decompiler/ClassAnalyzer.java @@ -20,7 +20,8 @@ package jode.decompiler; import jode.GlobalOptions; import jode.Decompiler; -import jode.type.*; +import jode.type.MethodType; +import jode.type.Type; import jode.bytecode.ClassInfo; import jode.bytecode.FieldInfo; import jode.bytecode.MethodInfo; @@ -32,10 +33,11 @@ import jode.expr.ConstructorOperator; import jode.flow.TransformConstructors; import jode.flow.StructuredBlock; +import java.lang.reflect.Modifier; import java.util.NoSuchElementException; import java.util.Vector; import java.util.Enumeration; -import java.lang.reflect.Modifier; +import java.io.IOException; public class ClassAnalyzer implements Analyzer, Scope, Declarable, ClassDeclarer @@ -256,7 +258,7 @@ public class ClassAnalyzer fields[j] = new FieldAnalyzer(this, finfos[j], imports); staticConstructor = null; - java.util.Vector constrVector = new java.util.Vector(); + Vector constrVector = new Vector(); for (int j=0; j < methods.length; j++) { methods[j] = new MethodAnalyzer(this, minfos[j], imports); @@ -339,13 +341,12 @@ public class ClassAnalyzer for (int j=0; j < methods.length; j++) methods[j].makeDeclaration(); } - public void dumpDeclaration(TabbedPrintWriter writer) - throws java.io.IOException + public void dumpDeclaration(TabbedPrintWriter writer) throws IOException { dumpSource(writer); } - public void dumpBlock(TabbedPrintWriter writer) throws java.io.IOException + public void dumpBlock(TabbedPrintWriter writer) throws IOException { writer.pushScope(this); boolean needFieldNewLine = false; @@ -412,7 +413,7 @@ public class ClassAnalyzer writer.popScope(); } - public void dumpSource(TabbedPrintWriter writer) throws java.io.IOException + public void dumpSource(TabbedPrintWriter writer) throws IOException { if (fields == null) { /* This means that the class could not be loaded. @@ -469,8 +470,7 @@ public class ClassAnalyzer writer.closeBrace(); } - public void dumpJavaFile(TabbedPrintWriter writer) - throws java.io.IOException { + public void dumpJavaFile(TabbedPrintWriter writer) throws IOException { imports.init(clazz.getName()); LocalInfo.init(); analyze(); diff --git a/jode/jode/decompiler/FieldAnalyzer.java b/jode/jode/decompiler/FieldAnalyzer.java index bc50e88..ba4d446 100644 --- a/jode/jode/decompiler/FieldAnalyzer.java +++ b/jode/jode/decompiler/FieldAnalyzer.java @@ -18,8 +18,7 @@ */ package jode.decompiler; -import java.lang.reflect.Modifier; -import jode.type.*; +import jode.type.Type; import jode.bytecode.FieldInfo; import jode.expr.Expression; import jode.expr.ThisOperator; @@ -27,6 +26,9 @@ import jode.expr.LocalLoadOperator; import jode.expr.ConstOperator; import jode.expr.OuterLocalOperator; +import java.lang.reflect.Modifier; +import java.io.IOException; + public class FieldAnalyzer implements Analyzer { ClassAnalyzer clazz; ImportHandler imports; @@ -144,8 +146,7 @@ public class FieldAnalyzer implements Analyzer { return analyzedSynthetic; } - public void dumpSource(TabbedPrintWriter writer) - throws java.io.IOException + public void dumpSource(TabbedPrintWriter writer) throws IOException { if (isDeprecated) { writer.println("/**"); diff --git a/jode/jode/decompiler/ImportHandler.java b/jode/jode/decompiler/ImportHandler.java index e15b723..5b8ed9c 100644 --- a/jode/jode/decompiler/ImportHandler.java +++ b/jode/jode/decompiler/ImportHandler.java @@ -21,7 +21,10 @@ package jode.decompiler; import jode.GlobalOptions; import jode.bytecode.ClassInfo; import jode.bytecode.InnerClassInfo; -import jode.type.*; +import jode.type.Type; +import jode.type.ArrayType; +import jode.type.ClassInterfacesType; +import jode.type.NullType; ///#ifdef JDK12 ///import java.util.SortedMap;