imports cleaned up

git-svn-id: https://svn.code.sf.net/p/jode/code/trunk@1063 379699f6-c40d-0410-875b-85095c16579e
branch_1_1
jochen 26 years ago
parent 56464880ac
commit 2ecb19a3d9
  1. 12
      jode/jode/Decompiler.java
  2. 18
      jode/jode/decompiler/ClassAnalyzer.java
  3. 9
      jode/jode/decompiler/FieldAnalyzer.java
  4. 5
      jode/jode/decompiler/ImportHandler.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;

@ -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();

@ -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("/**");

@ -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;

Loading…
Cancel
Save