From e5656fc869ccc7f7b60a095e692c2475f7f130bf Mon Sep 17 00:00:00 2001 From: nickl- Date: Mon, 30 Oct 2017 21:27:52 +0200 Subject: [PATCH] Organize imports to disolve ambiguity. --- src/main/javassist/CodeConverter.java | 17 ++++++++-- src/main/javassist/CtBehavior.java | 22 +++++++++++-- src/main/javassist/CtClassType.java | 10 +++--- src/main/javassist/CtConstructor.java | 12 +++++-- src/main/javassist/CtField.java | 14 ++++++-- src/main/javassist/CtMethod.java | 10 +++++- src/main/javassist/CtNewClass.java | 1 + src/main/javassist/CtNewConstructor.java | 7 ++-- src/main/javassist/CtNewMethod.java | 11 +++++-- .../javassist/CtNewWrappedConstructor.java | 4 ++- src/main/javassist/CtNewWrappedMethod.java | 9 ++++-- src/main/javassist/Loader.java | 4 +-- src/main/javassist/LoaderClassPath.java | 2 +- src/main/javassist/SerialVersionUID.java | 13 +++++--- src/main/javassist/URLClassPath.java | 7 ++-- .../bytecode/AnnotationDefaultAttribute.java | 8 ++--- .../bytecode/AnnotationsAttribute.java | 26 ++++++++++++--- .../javassist/bytecode/AttributeInfo.java | 2 -- src/main/javassist/bytecode/ByteStream.java | 2 +- .../javassist/bytecode/ClassFilePrinter.java | 3 +- .../javassist/bytecode/ClassFileWriter.java | 3 +- src/main/javassist/bytecode/ConstPool.java | 4 +-- .../javassist/bytecode/ConstantAttribute.java | 2 +- src/main/javassist/bytecode/Descriptor.java | 3 +- .../bytecode/EnclosingMethodAttribute.java | 2 -- src/main/javassist/bytecode/FieldInfo.java | 2 +- .../bytecode/InnerClassesAttribute.java | 2 +- .../ParameterAnnotationsAttribute.java | 9 +++--- .../bytecode/SignatureAttribute.java | 2 +- .../javassist/bytecode/StackMapTable.java | 5 +-- .../bytecode/TypeAnnotationsAttribute.java | 1 + .../bytecode/annotation/Annotation.java | 14 ++++---- .../annotation/AnnotationMemberValue.java | 5 +-- .../annotation/AnnotationsWriter.java | 3 +- .../bytecode/annotation/ArrayMemberValue.java | 5 +-- .../annotation/BooleanMemberValue.java | 5 +-- .../bytecode/annotation/ByteMemberValue.java | 5 +-- .../bytecode/annotation/CharMemberValue.java | 5 +-- .../bytecode/annotation/ClassMemberValue.java | 6 ++-- .../annotation/DoubleMemberValue.java | 5 +-- .../bytecode/annotation/FloatMemberValue.java | 5 +-- .../annotation/IntegerMemberValue.java | 5 +-- .../bytecode/annotation/LongMemberValue.java | 5 +-- .../bytecode/annotation/MemberValue.java | 7 ++-- .../bytecode/annotation/ShortMemberValue.java | 5 +-- .../annotation/StringMemberValue.java | 5 +-- .../bytecode/stackmap/BasicBlock.java | 12 +++++-- .../javassist/bytecode/stackmap/MapMaker.java | 9 +++++- .../javassist/bytecode/stackmap/Tracer.java | 6 ++-- .../javassist/bytecode/stackmap/TypeData.java | 13 ++++---- .../bytecode/stackmap/TypedBlock.java | 6 +++- .../javassist/compiler/AccessorMaker.java | 16 ++++++++-- src/main/javassist/compiler/CodeGen.java | 28 ++++++++++++++-- src/main/javassist/compiler/Javac.java | 26 +++++++++------ src/main/javassist/compiler/JvstCodeGen.java | 18 +++++++++-- .../javassist/compiler/JvstTypeChecker.java | 13 ++++++-- .../javassist/compiler/MemberCodeGen.java | 32 ++++++++++++++++--- .../javassist/compiler/MemberResolver.java | 23 +++++++++---- src/main/javassist/compiler/Parser.java | 24 +++++++++++++- src/main/javassist/compiler/SymbolTable.java | 1 + src/main/javassist/compiler/TypeChecker.java | 27 ++++++++++++++-- src/main/javassist/compiler/ast/ASTree.java | 1 + src/main/javassist/compiler/ast/CallExpr.java | 2 +- src/main/javassist/compiler/ast/CastExpr.java | 2 +- .../javassist/compiler/ast/Declarator.java | 2 +- src/main/javassist/compiler/ast/Expr.java | 2 +- src/main/javassist/compiler/ast/Member.java | 2 +- src/main/javassist/compiler/ast/NewExpr.java | 2 +- src/main/javassist/compiler/ast/Stmnt.java | 2 +- .../convert/TransformAccessArrayField.java | 2 +- .../javassist/convert/TransformAfter.java | 3 +- .../javassist/convert/TransformBefore.java | 7 +++- src/main/javassist/convert/TransformCall.java | 7 ++-- .../convert/TransformFieldAccess.java | 4 ++- src/main/javassist/convert/TransformNew.java | 9 ++++-- .../javassist/convert/TransformNewClass.java | 6 ++-- .../javassist/convert/TransformReadField.java | 6 ++-- .../convert/TransformWriteField.java | 5 ++- src/main/javassist/expr/Cast.java | 20 ++++++++++-- src/main/javassist/expr/Expr.java | 6 ++-- src/main/javassist/expr/ExprEditor.java | 9 ++++-- src/main/javassist/expr/FieldAccess.java | 23 +++++++++++-- src/main/javassist/expr/Handler.java | 16 ++++++++-- src/main/javassist/expr/Instanceof.java | 20 ++++++++++-- src/main/javassist/expr/MethodCall.java | 18 +++++++++-- src/main/javassist/expr/NewArray.java | 21 ++++++++++-- src/main/javassist/expr/NewExpr.java | 22 +++++++++++-- src/main/javassist/tools/Callback.java | 6 ++-- src/main/javassist/tools/Dump.java | 5 ++- .../tools/reflect/CannotInvokeException.java | 1 - .../tools/reflect/CannotReflectException.java | 1 + .../tools/reflect/ClassMetaobject.java | 8 +++-- .../javassist/tools/reflect/Compiler.java | 5 +-- src/main/javassist/tools/reflect/Loader.java | 2 +- .../javassist/tools/reflect/Metaobject.java | 4 +-- .../javassist/tools/reflect/Reflection.java | 13 ++++++-- .../javassist/tools/rmi/AppletServer.java | 20 ++++++++---- .../javassist/tools/rmi/ObjectImporter.java | 13 ++++++-- .../javassist/tools/rmi/StubGenerator.java | 12 ++++++- src/main/javassist/tools/web/Viewer.java | 6 ++-- src/main/javassist/tools/web/Webserver.java | 19 +++++++++-- src/main/javassist/util/HotSwapAgent.java | 3 +- src/main/javassist/util/HotSwapper.java | 25 +++++++++++---- .../javassist/util/proxy/ProxyFactory.java | 32 +++++++++++++++---- .../javassist/util/proxy/RuntimeSupport.java | 2 +- .../javassist/util/proxy/SerializedProxy.java | 4 +-- 106 files changed, 720 insertions(+), 238 deletions(-) diff --git a/src/main/javassist/CodeConverter.java b/src/main/javassist/CodeConverter.java index 4a8cec61..6df3622c 100644 --- a/src/main/javassist/CodeConverter.java +++ b/src/main/javassist/CodeConverter.java @@ -16,8 +16,21 @@ package javassist; -import javassist.bytecode.*; -import javassist.convert.*; +import javassist.bytecode.BadBytecode; +import javassist.bytecode.CodeAttribute; +import javassist.bytecode.CodeIterator; +import javassist.bytecode.ConstPool; +import javassist.bytecode.MethodInfo; +import javassist.convert.TransformAccessArrayField; +import javassist.convert.TransformAfter; +import javassist.convert.TransformBefore; +import javassist.convert.TransformCall; +import javassist.convert.TransformFieldAccess; +import javassist.convert.TransformNew; +import javassist.convert.TransformNewClass; +import javassist.convert.TransformReadField; +import javassist.convert.TransformWriteField; +import javassist.convert.Transformer; /** * Simple translator of method bodies diff --git a/src/main/javassist/CtBehavior.java b/src/main/javassist/CtBehavior.java index da1c7e9f..1b9dbf0b 100644 --- a/src/main/javassist/CtBehavior.java +++ b/src/main/javassist/CtBehavior.java @@ -16,9 +16,27 @@ package javassist; -import javassist.bytecode.*; -import javassist.compiler.Javac; +import javassist.bytecode.AccessFlag; +import javassist.bytecode.AnnotationsAttribute; +import javassist.bytecode.AttributeInfo; +import javassist.bytecode.BadBytecode; +import javassist.bytecode.Bytecode; +import javassist.bytecode.CodeAttribute; +import javassist.bytecode.CodeIterator; +import javassist.bytecode.ConstPool; +import javassist.bytecode.Descriptor; +import javassist.bytecode.ExceptionsAttribute; +import javassist.bytecode.LineNumberAttribute; +import javassist.bytecode.LocalVariableAttribute; +import javassist.bytecode.LocalVariableTypeAttribute; +import javassist.bytecode.MethodInfo; +import javassist.bytecode.Opcode; +import javassist.bytecode.ParameterAnnotationsAttribute; +import javassist.bytecode.SignatureAttribute; +import javassist.bytecode.StackMap; +import javassist.bytecode.StackMapTable; import javassist.compiler.CompileError; +import javassist.compiler.Javac; import javassist.expr.ExprEditor; /** diff --git a/src/main/javassist/CtClassType.java b/src/main/javassist/CtClassType.java index eaff92e0..0c2f775e 100644 --- a/src/main/javassist/CtClassType.java +++ b/src/main/javassist/CtClassType.java @@ -16,15 +16,15 @@ package javassist; -import java.lang.ref.Reference; -import java.lang.ref.WeakReference; import java.io.BufferedInputStream; -import java.io.ByteArrayOutputStream; import java.io.ByteArrayInputStream; +import java.io.ByteArrayOutputStream; import java.io.DataInputStream; import java.io.DataOutputStream; import java.io.IOException; import java.io.InputStream; +import java.lang.ref.Reference; +import java.lang.ref.WeakReference; import java.net.URL; import java.util.ArrayList; import java.util.HashMap; @@ -34,15 +34,15 @@ import java.util.Map; import java.util.Set; import javassist.bytecode.AccessFlag; -import javassist.bytecode.AttributeInfo; import javassist.bytecode.AnnotationsAttribute; +import javassist.bytecode.AttributeInfo; import javassist.bytecode.BadBytecode; import javassist.bytecode.Bytecode; import javassist.bytecode.ClassFile; import javassist.bytecode.CodeAttribute; -import javassist.bytecode.ConstantAttribute; import javassist.bytecode.CodeIterator; import javassist.bytecode.ConstPool; +import javassist.bytecode.ConstantAttribute; import javassist.bytecode.Descriptor; import javassist.bytecode.EnclosingMethodAttribute; import javassist.bytecode.FieldInfo; diff --git a/src/main/javassist/CtConstructor.java b/src/main/javassist/CtConstructor.java index e735a58e..8e293ca2 100644 --- a/src/main/javassist/CtConstructor.java +++ b/src/main/javassist/CtConstructor.java @@ -16,9 +16,17 @@ package javassist; -import javassist.bytecode.*; -import javassist.compiler.Javac; +import javassist.bytecode.BadBytecode; +import javassist.bytecode.Bytecode; +import javassist.bytecode.ClassFile; +import javassist.bytecode.CodeAttribute; +import javassist.bytecode.CodeIterator; +import javassist.bytecode.ConstPool; +import javassist.bytecode.Descriptor; +import javassist.bytecode.MethodInfo; +import javassist.bytecode.Opcode; import javassist.compiler.CompileError; +import javassist.compiler.Javac; /** * An instance of CtConstructor represents a constructor. diff --git a/src/main/javassist/CtField.java b/src/main/javassist/CtField.java index 9e2c8ed5..892fff82 100644 --- a/src/main/javassist/CtField.java +++ b/src/main/javassist/CtField.java @@ -18,13 +18,21 @@ package javassist; import java.util.List; -import javassist.bytecode.*; +import javassist.bytecode.AccessFlag; +import javassist.bytecode.AnnotationsAttribute; +import javassist.bytecode.AttributeInfo; +import javassist.bytecode.Bytecode; +import javassist.bytecode.ClassFile; +import javassist.bytecode.ConstPool; +import javassist.bytecode.Descriptor; +import javassist.bytecode.FieldInfo; +import javassist.bytecode.SignatureAttribute; +import javassist.compiler.CompileError; import javassist.compiler.Javac; import javassist.compiler.SymbolTable; -import javassist.compiler.CompileError; import javassist.compiler.ast.ASTree; -import javassist.compiler.ast.IntConst; import javassist.compiler.ast.DoubleConst; +import javassist.compiler.ast.IntConst; import javassist.compiler.ast.StringL; /** diff --git a/src/main/javassist/CtMethod.java b/src/main/javassist/CtMethod.java index f2a26b5f..3702e351 100644 --- a/src/main/javassist/CtMethod.java +++ b/src/main/javassist/CtMethod.java @@ -16,7 +16,15 @@ package javassist; -import javassist.bytecode.*; +import javassist.bytecode.AccessFlag; +import javassist.bytecode.BadBytecode; +import javassist.bytecode.Bytecode; +import javassist.bytecode.CodeAttribute; +import javassist.bytecode.CodeIterator; +import javassist.bytecode.ConstPool; +import javassist.bytecode.Descriptor; +import javassist.bytecode.MethodInfo; +import javassist.bytecode.Opcode; /** * An instance of CtMethod represents a method. diff --git a/src/main/javassist/CtNewClass.java b/src/main/javassist/CtNewClass.java index bd5c4b37..b0a14806 100644 --- a/src/main/javassist/CtNewClass.java +++ b/src/main/javassist/CtNewClass.java @@ -18,6 +18,7 @@ package javassist; import java.io.DataOutputStream; import java.io.IOException; + import javassist.bytecode.ClassFile; class CtNewClass extends CtClassType { diff --git a/src/main/javassist/CtNewConstructor.java b/src/main/javassist/CtNewConstructor.java index ecec642f..9f4225f1 100644 --- a/src/main/javassist/CtNewConstructor.java +++ b/src/main/javassist/CtNewConstructor.java @@ -16,10 +16,11 @@ package javassist; -import javassist.bytecode.*; -import javassist.compiler.Javac; -import javassist.compiler.CompileError; import javassist.CtMethod.ConstParameter; +import javassist.bytecode.Bytecode; +import javassist.bytecode.ConstPool; +import javassist.compiler.CompileError; +import javassist.compiler.Javac; /** * A collection of static methods for creating a CtConstructor. diff --git a/src/main/javassist/CtNewMethod.java b/src/main/javassist/CtNewMethod.java index 48d8629a..3daaa026 100644 --- a/src/main/javassist/CtNewMethod.java +++ b/src/main/javassist/CtNewMethod.java @@ -16,10 +16,15 @@ package javassist; -import javassist.bytecode.*; -import javassist.compiler.Javac; -import javassist.compiler.CompileError; import javassist.CtMethod.ConstParameter; +import javassist.bytecode.AccessFlag; +import javassist.bytecode.Bytecode; +import javassist.bytecode.ConstPool; +import javassist.bytecode.ExceptionsAttribute; +import javassist.bytecode.FieldInfo; +import javassist.bytecode.MethodInfo; +import javassist.compiler.CompileError; +import javassist.compiler.Javac; /** * A collection of static methods for creating a CtMethod. diff --git a/src/main/javassist/CtNewWrappedConstructor.java b/src/main/javassist/CtNewWrappedConstructor.java index 7163f1ce..8e6b3654 100644 --- a/src/main/javassist/CtNewWrappedConstructor.java +++ b/src/main/javassist/CtNewWrappedConstructor.java @@ -16,8 +16,10 @@ package javassist; -import javassist.bytecode.*; import javassist.CtMethod.ConstParameter; +import javassist.bytecode.Bytecode; +import javassist.bytecode.ClassFile; +import javassist.bytecode.Descriptor; class CtNewWrappedConstructor extends CtNewWrappedMethod { private static final int PASS_NONE = CtNewConstructor.PASS_NONE; diff --git a/src/main/javassist/CtNewWrappedMethod.java b/src/main/javassist/CtNewWrappedMethod.java index 7d7e421a..2e6a6a87 100644 --- a/src/main/javassist/CtNewWrappedMethod.java +++ b/src/main/javassist/CtNewWrappedMethod.java @@ -16,11 +16,16 @@ package javassist; -import javassist.bytecode.*; -import javassist.compiler.JvstCodeGen; import java.util.Map; import javassist.CtMethod.ConstParameter; +import javassist.bytecode.AccessFlag; +import javassist.bytecode.BadBytecode; +import javassist.bytecode.Bytecode; +import javassist.bytecode.ClassFile; +import javassist.bytecode.MethodInfo; +import javassist.bytecode.SyntheticAttribute; +import javassist.compiler.JvstCodeGen; class CtNewWrappedMethod { diff --git a/src/main/javassist/Loader.java b/src/main/javassist/Loader.java index d589f293..cbbf09e5 100644 --- a/src/main/javassist/Loader.java +++ b/src/main/javassist/Loader.java @@ -16,12 +16,12 @@ package javassist; -import java.io.*; +import java.io.InputStream; import java.lang.reflect.InvocationTargetException; +import java.security.ProtectionDomain; import java.util.Arrays; import java.util.Hashtable; import java.util.Vector; -import java.security.ProtectionDomain; /** * The class loader for Javassist. diff --git a/src/main/javassist/LoaderClassPath.java b/src/main/javassist/LoaderClassPath.java index 804bc472..d13e2a7f 100644 --- a/src/main/javassist/LoaderClassPath.java +++ b/src/main/javassist/LoaderClassPath.java @@ -17,9 +17,9 @@ package javassist; import java.io.InputStream; -import java.net.URL; import java.lang.ref.Reference; import java.lang.ref.WeakReference; +import java.net.URL; /** * A class search-path representing a class loader. diff --git a/src/main/javassist/SerialVersionUID.java b/src/main/javassist/SerialVersionUID.java index 3b80e1b5..ebb18bfa 100644 --- a/src/main/javassist/SerialVersionUID.java +++ b/src/main/javassist/SerialVersionUID.java @@ -16,12 +16,17 @@ package javassist; -import java.io.*; +import java.io.ByteArrayOutputStream; +import java.io.DataOutputStream; +import java.io.IOException; import java.lang.reflect.Modifier; +import java.security.MessageDigest; +import java.security.NoSuchAlgorithmException; +import java.util.Arrays; +import java.util.Comparator; -import javassist.bytecode.*; -import java.util.*; -import java.security.*; +import javassist.bytecode.ClassFile; +import javassist.bytecode.Descriptor; /** * Utility for calculating serialVersionUIDs for Serializable classes. diff --git a/src/main/javassist/URLClassPath.java b/src/main/javassist/URLClassPath.java index 5f54c396..cf55c320 100644 --- a/src/main/javassist/URLClassPath.java +++ b/src/main/javassist/URLClassPath.java @@ -16,8 +16,11 @@ package javassist; -import java.io.*; -import java.net.*; +import java.io.IOException; +import java.io.InputStream; +import java.net.MalformedURLException; +import java.net.URL; +import java.net.URLConnection; /** * A class search-path specified with URL (http). diff --git a/src/main/javassist/bytecode/AnnotationDefaultAttribute.java b/src/main/javassist/bytecode/AnnotationDefaultAttribute.java index b993694b..43021ecf 100644 --- a/src/main/javassist/bytecode/AnnotationDefaultAttribute.java +++ b/src/main/javassist/bytecode/AnnotationDefaultAttribute.java @@ -16,15 +16,15 @@ package javassist.bytecode; -import javassist.CtClass; -import javassist.bytecode.annotation.AnnotationsWriter; -import javassist.bytecode.annotation.MemberValue; - import java.io.ByteArrayOutputStream; import java.io.DataInputStream; import java.io.IOException; import java.util.Map; +import javassist.CtClass; +import javassist.bytecode.annotation.AnnotationsWriter; +import javassist.bytecode.annotation.MemberValue; + /** * A class representing AnnotationDefault_attribute. * diff --git a/src/main/javassist/bytecode/AnnotationsAttribute.java b/src/main/javassist/bytecode/AnnotationsAttribute.java index 44c2d86d..73fcd73a 100644 --- a/src/main/javassist/bytecode/AnnotationsAttribute.java +++ b/src/main/javassist/bytecode/AnnotationsAttribute.java @@ -16,12 +16,28 @@ package javassist.bytecode; -import java.util.Map; -import java.util.HashMap; -import java.io.IOException; -import java.io.DataInputStream; import java.io.ByteArrayOutputStream; -import javassist.bytecode.annotation.*; +import java.io.DataInputStream; +import java.io.IOException; +import java.util.HashMap; +import java.util.Map; + +import javassist.bytecode.annotation.Annotation; +import javassist.bytecode.annotation.AnnotationMemberValue; +import javassist.bytecode.annotation.AnnotationsWriter; +import javassist.bytecode.annotation.ArrayMemberValue; +import javassist.bytecode.annotation.BooleanMemberValue; +import javassist.bytecode.annotation.ByteMemberValue; +import javassist.bytecode.annotation.CharMemberValue; +import javassist.bytecode.annotation.ClassMemberValue; +import javassist.bytecode.annotation.DoubleMemberValue; +import javassist.bytecode.annotation.EnumMemberValue; +import javassist.bytecode.annotation.FloatMemberValue; +import javassist.bytecode.annotation.IntegerMemberValue; +import javassist.bytecode.annotation.LongMemberValue; +import javassist.bytecode.annotation.MemberValue; +import javassist.bytecode.annotation.ShortMemberValue; +import javassist.bytecode.annotation.StringMemberValue; /** * A class representing diff --git a/src/main/javassist/bytecode/AttributeInfo.java b/src/main/javassist/bytecode/AttributeInfo.java index ac17b4c5..4bfd0dbb 100644 --- a/src/main/javassist/bytecode/AttributeInfo.java +++ b/src/main/javassist/bytecode/AttributeInfo.java @@ -21,9 +21,7 @@ import java.io.DataOutputStream; import java.io.IOException; import java.util.ArrayList; import java.util.Arrays; -import java.util.Iterator; import java.util.List; -import java.util.ListIterator; import java.util.Map; // Note: if you define a new subclass of AttributeInfo, then diff --git a/src/main/javassist/bytecode/ByteStream.java b/src/main/javassist/bytecode/ByteStream.java index b5330a24..ee485911 100644 --- a/src/main/javassist/bytecode/ByteStream.java +++ b/src/main/javassist/bytecode/ByteStream.java @@ -16,8 +16,8 @@ package javassist.bytecode; -import java.io.OutputStream; import java.io.IOException; +import java.io.OutputStream; final class ByteStream extends OutputStream { private byte[] buf; diff --git a/src/main/javassist/bytecode/ClassFilePrinter.java b/src/main/javassist/bytecode/ClassFilePrinter.java index 58efa0f5..a9c7d9ba 100644 --- a/src/main/javassist/bytecode/ClassFilePrinter.java +++ b/src/main/javassist/bytecode/ClassFilePrinter.java @@ -17,9 +17,10 @@ package javassist.bytecode; import java.io.PrintWriter; -import javassist.Modifier; import java.util.List; +import javassist.Modifier; + /** * A utility class for priting the contents of a class file. * It prints a constant pool table, fields, and methods in a diff --git a/src/main/javassist/bytecode/ClassFileWriter.java b/src/main/javassist/bytecode/ClassFileWriter.java index d1e76ce0..931ffcb4 100644 --- a/src/main/javassist/bytecode/ClassFileWriter.java +++ b/src/main/javassist/bytecode/ClassFileWriter.java @@ -16,10 +16,9 @@ package javassist.bytecode; -import java.io.OutputStream; import java.io.DataOutputStream; -import java.io.ByteArrayOutputStream; import java.io.IOException; +import java.io.OutputStream; /** * A quick class-file writer. This is useful when a generated diff --git a/src/main/javassist/bytecode/ConstPool.java b/src/main/javassist/bytecode/ConstPool.java index 59ff5945..0447ece7 100644 --- a/src/main/javassist/bytecode/ConstPool.java +++ b/src/main/javassist/bytecode/ConstPool.java @@ -16,11 +16,11 @@ package javassist.bytecode; +import java.io.ByteArrayOutputStream; import java.io.DataInputStream; import java.io.DataOutputStream; -import java.io.ByteArrayOutputStream; -import java.io.PrintWriter; import java.io.IOException; +import java.io.PrintWriter; import java.util.HashMap; import java.util.HashSet; import java.util.Map; diff --git a/src/main/javassist/bytecode/ConstantAttribute.java b/src/main/javassist/bytecode/ConstantAttribute.java index 405c954e..40c395c7 100644 --- a/src/main/javassist/bytecode/ConstantAttribute.java +++ b/src/main/javassist/bytecode/ConstantAttribute.java @@ -17,8 +17,8 @@ package javassist.bytecode; import java.io.DataInputStream; -import java.util.Map; import java.io.IOException; +import java.util.Map; /** * ConstantValue_attribute. diff --git a/src/main/javassist/bytecode/Descriptor.java b/src/main/javassist/bytecode/Descriptor.java index 0ed87cc5..fc49b876 100644 --- a/src/main/javassist/bytecode/Descriptor.java +++ b/src/main/javassist/bytecode/Descriptor.java @@ -16,11 +16,12 @@ package javassist.bytecode; +import java.util.Map; + import javassist.ClassPool; import javassist.CtClass; import javassist.CtPrimitiveType; import javassist.NotFoundException; -import java.util.Map; /** * A support class for dealing with descriptors. diff --git a/src/main/javassist/bytecode/EnclosingMethodAttribute.java b/src/main/javassist/bytecode/EnclosingMethodAttribute.java index ae7c28d8..9eee2a0e 100644 --- a/src/main/javassist/bytecode/EnclosingMethodAttribute.java +++ b/src/main/javassist/bytecode/EnclosingMethodAttribute.java @@ -20,8 +20,6 @@ import java.io.DataInputStream; import java.io.IOException; import java.util.Map; -import javassist.CtConstructor; - /** * EnclosingMethod_attribute. */ diff --git a/src/main/javassist/bytecode/FieldInfo.java b/src/main/javassist/bytecode/FieldInfo.java index 6a5204e5..7d26327a 100644 --- a/src/main/javassist/bytecode/FieldInfo.java +++ b/src/main/javassist/bytecode/FieldInfo.java @@ -19,8 +19,8 @@ package javassist.bytecode; import java.io.DataInputStream; import java.io.DataOutputStream; import java.io.IOException; -import java.util.List; import java.util.ArrayList; +import java.util.List; /** * field_info structure. diff --git a/src/main/javassist/bytecode/InnerClassesAttribute.java b/src/main/javassist/bytecode/InnerClassesAttribute.java index ce730a2f..1bce893b 100644 --- a/src/main/javassist/bytecode/InnerClassesAttribute.java +++ b/src/main/javassist/bytecode/InnerClassesAttribute.java @@ -17,8 +17,8 @@ package javassist.bytecode; import java.io.DataInputStream; -import java.util.Map; import java.io.IOException; +import java.util.Map; /** * InnerClasses_attribute. diff --git a/src/main/javassist/bytecode/ParameterAnnotationsAttribute.java b/src/main/javassist/bytecode/ParameterAnnotationsAttribute.java index 5e4949fd..49e2646f 100644 --- a/src/main/javassist/bytecode/ParameterAnnotationsAttribute.java +++ b/src/main/javassist/bytecode/ParameterAnnotationsAttribute.java @@ -16,16 +16,17 @@ package javassist.bytecode; +import java.io.ByteArrayOutputStream; +import java.io.DataInputStream; +import java.io.IOException; import java.util.HashMap; import java.util.Map; -import java.io.IOException; -import java.io.DataInputStream; -import java.io.ByteArrayOutputStream; import javassist.bytecode.AnnotationsAttribute.Copier; import javassist.bytecode.AnnotationsAttribute.Parser; import javassist.bytecode.AnnotationsAttribute.Renamer; -import javassist.bytecode.annotation.*; +import javassist.bytecode.annotation.Annotation; +import javassist.bytecode.annotation.AnnotationsWriter; /** * A class representing RuntimeVisibleAnnotations_attribute and diff --git a/src/main/javassist/bytecode/SignatureAttribute.java b/src/main/javassist/bytecode/SignatureAttribute.java index 78500aaa..1a8a62dc 100644 --- a/src/main/javassist/bytecode/SignatureAttribute.java +++ b/src/main/javassist/bytecode/SignatureAttribute.java @@ -18,10 +18,10 @@ package javassist.bytecode; import java.io.DataInputStream; import java.io.IOException; -import java.util.Map; import java.util.ArrayList; import java.util.HashMap; import java.util.List; +import java.util.Map; import javassist.CtClass; diff --git a/src/main/javassist/bytecode/StackMapTable.java b/src/main/javassist/bytecode/StackMapTable.java index de4f27b8..9b8e5fae 100644 --- a/src/main/javassist/bytecode/StackMapTable.java +++ b/src/main/javassist/bytecode/StackMapTable.java @@ -16,12 +16,13 @@ package javassist.bytecode; +import java.io.ByteArrayOutputStream; import java.io.DataInputStream; import java.io.DataOutputStream; -import java.io.ByteArrayOutputStream; -import java.io.PrintWriter; import java.io.IOException; +import java.io.PrintWriter; import java.util.Map; + import javassist.CannotCompileException; /** diff --git a/src/main/javassist/bytecode/TypeAnnotationsAttribute.java b/src/main/javassist/bytecode/TypeAnnotationsAttribute.java index 862ab1a1..86fea728 100644 --- a/src/main/javassist/bytecode/TypeAnnotationsAttribute.java +++ b/src/main/javassist/bytecode/TypeAnnotationsAttribute.java @@ -4,6 +4,7 @@ import java.io.DataInputStream; import java.io.IOException; import java.util.HashMap; import java.util.Map; + import javassist.bytecode.annotation.TypeAnnotationsWriter; /** diff --git a/src/main/javassist/bytecode/annotation/Annotation.java b/src/main/javassist/bytecode/annotation/Annotation.java index cd44d822..1cec468b 100644 --- a/src/main/javassist/bytecode/annotation/Annotation.java +++ b/src/main/javassist/bytecode/annotation/Annotation.java @@ -16,18 +16,18 @@ package javassist.bytecode.annotation; -import javassist.bytecode.ConstPool; -import javassist.bytecode.Descriptor; -import javassist.ClassPool; -import javassist.CtClass; -import javassist.CtMethod; -import javassist.NotFoundException; - import java.io.IOException; import java.util.LinkedHashMap; import java.util.Map; import java.util.Set; +import javassist.ClassPool; +import javassist.CtClass; +import javassist.CtMethod; +import javassist.NotFoundException; +import javassist.bytecode.ConstPool; +import javassist.bytecode.Descriptor; + /** * The annotation structure. * diff --git a/src/main/javassist/bytecode/annotation/AnnotationMemberValue.java b/src/main/javassist/bytecode/annotation/AnnotationMemberValue.java index b2143808..7691e44f 100644 --- a/src/main/javassist/bytecode/annotation/AnnotationMemberValue.java +++ b/src/main/javassist/bytecode/annotation/AnnotationMemberValue.java @@ -15,11 +15,12 @@ */ package javassist.bytecode.annotation; -import javassist.ClassPool; -import javassist.bytecode.ConstPool; import java.io.IOException; import java.lang.reflect.Method; +import javassist.ClassPool; +import javassist.bytecode.ConstPool; + /** * Nested annotation. * diff --git a/src/main/javassist/bytecode/annotation/AnnotationsWriter.java b/src/main/javassist/bytecode/annotation/AnnotationsWriter.java index e2203d4e..8095fbe1 100644 --- a/src/main/javassist/bytecode/annotation/AnnotationsWriter.java +++ b/src/main/javassist/bytecode/annotation/AnnotationsWriter.java @@ -16,7 +16,8 @@ package javassist.bytecode.annotation; -import java.io.*; +import java.io.IOException; +import java.io.OutputStream; import javassist.bytecode.ByteArray; import javassist.bytecode.ConstPool; diff --git a/src/main/javassist/bytecode/annotation/ArrayMemberValue.java b/src/main/javassist/bytecode/annotation/ArrayMemberValue.java index a6d9029a..d1eeb271 100644 --- a/src/main/javassist/bytecode/annotation/ArrayMemberValue.java +++ b/src/main/javassist/bytecode/annotation/ArrayMemberValue.java @@ -15,12 +15,13 @@ */ package javassist.bytecode.annotation; -import javassist.ClassPool; -import javassist.bytecode.ConstPool; import java.io.IOException; import java.lang.reflect.Array; import java.lang.reflect.Method; +import javassist.ClassPool; +import javassist.bytecode.ConstPool; + /** * Array member. * diff --git a/src/main/javassist/bytecode/annotation/BooleanMemberValue.java b/src/main/javassist/bytecode/annotation/BooleanMemberValue.java index 02215625..c9ec3c32 100644 --- a/src/main/javassist/bytecode/annotation/BooleanMemberValue.java +++ b/src/main/javassist/bytecode/annotation/BooleanMemberValue.java @@ -15,11 +15,12 @@ */ package javassist.bytecode.annotation; -import javassist.ClassPool; -import javassist.bytecode.ConstPool; import java.io.IOException; import java.lang.reflect.Method; +import javassist.ClassPool; +import javassist.bytecode.ConstPool; + /** * Boolean constant value. * diff --git a/src/main/javassist/bytecode/annotation/ByteMemberValue.java b/src/main/javassist/bytecode/annotation/ByteMemberValue.java index ab3ee6aa..be3f6e2e 100644 --- a/src/main/javassist/bytecode/annotation/ByteMemberValue.java +++ b/src/main/javassist/bytecode/annotation/ByteMemberValue.java @@ -15,11 +15,12 @@ */ package javassist.bytecode.annotation; -import javassist.ClassPool; -import javassist.bytecode.ConstPool; import java.io.IOException; import java.lang.reflect.Method; +import javassist.ClassPool; +import javassist.bytecode.ConstPool; + /** * Byte constant value. * diff --git a/src/main/javassist/bytecode/annotation/CharMemberValue.java b/src/main/javassist/bytecode/annotation/CharMemberValue.java index 53049c06..bf8d7b44 100644 --- a/src/main/javassist/bytecode/annotation/CharMemberValue.java +++ b/src/main/javassist/bytecode/annotation/CharMemberValue.java @@ -16,11 +16,12 @@ package javassist.bytecode.annotation; -import javassist.ClassPool; -import javassist.bytecode.ConstPool; import java.io.IOException; import java.lang.reflect.Method; +import javassist.ClassPool; +import javassist.bytecode.ConstPool; + /** * Char constant value. * diff --git a/src/main/javassist/bytecode/annotation/ClassMemberValue.java b/src/main/javassist/bytecode/annotation/ClassMemberValue.java index 3c850a91..e9fd7ec4 100644 --- a/src/main/javassist/bytecode/annotation/ClassMemberValue.java +++ b/src/main/javassist/bytecode/annotation/ClassMemberValue.java @@ -16,15 +16,15 @@ package javassist.bytecode.annotation; +import java.io.IOException; +import java.lang.reflect.Method; + import javassist.ClassPool; import javassist.bytecode.BadBytecode; import javassist.bytecode.ConstPool; import javassist.bytecode.Descriptor; import javassist.bytecode.SignatureAttribute; -import java.io.IOException; -import java.lang.reflect.Method; - /** * Class value. * diff --git a/src/main/javassist/bytecode/annotation/DoubleMemberValue.java b/src/main/javassist/bytecode/annotation/DoubleMemberValue.java index 2a58e060..3d9fdb28 100644 --- a/src/main/javassist/bytecode/annotation/DoubleMemberValue.java +++ b/src/main/javassist/bytecode/annotation/DoubleMemberValue.java @@ -16,11 +16,12 @@ package javassist.bytecode.annotation; -import javassist.ClassPool; -import javassist.bytecode.ConstPool; import java.io.IOException; import java.lang.reflect.Method; +import javassist.ClassPool; +import javassist.bytecode.ConstPool; + /** * Double floating-point number constant value. * diff --git a/src/main/javassist/bytecode/annotation/FloatMemberValue.java b/src/main/javassist/bytecode/annotation/FloatMemberValue.java index 679ec8c2..ef993792 100644 --- a/src/main/javassist/bytecode/annotation/FloatMemberValue.java +++ b/src/main/javassist/bytecode/annotation/FloatMemberValue.java @@ -16,11 +16,12 @@ package javassist.bytecode.annotation; -import javassist.ClassPool; -import javassist.bytecode.ConstPool; import java.io.IOException; import java.lang.reflect.Method; +import javassist.ClassPool; +import javassist.bytecode.ConstPool; + /** * Floating-point number constant value. * diff --git a/src/main/javassist/bytecode/annotation/IntegerMemberValue.java b/src/main/javassist/bytecode/annotation/IntegerMemberValue.java index 4863dd18..538b620c 100644 --- a/src/main/javassist/bytecode/annotation/IntegerMemberValue.java +++ b/src/main/javassist/bytecode/annotation/IntegerMemberValue.java @@ -16,11 +16,12 @@ package javassist.bytecode.annotation; -import javassist.ClassPool; -import javassist.bytecode.ConstPool; import java.io.IOException; import java.lang.reflect.Method; +import javassist.ClassPool; +import javassist.bytecode.ConstPool; + /** * Integer constant value. * diff --git a/src/main/javassist/bytecode/annotation/LongMemberValue.java b/src/main/javassist/bytecode/annotation/LongMemberValue.java index cd950c28..3dd29a37 100644 --- a/src/main/javassist/bytecode/annotation/LongMemberValue.java +++ b/src/main/javassist/bytecode/annotation/LongMemberValue.java @@ -16,11 +16,12 @@ package javassist.bytecode.annotation; -import javassist.ClassPool; -import javassist.bytecode.ConstPool; import java.io.IOException; import java.lang.reflect.Method; +import javassist.ClassPool; +import javassist.bytecode.ConstPool; + /** * Long integer constant value. * diff --git a/src/main/javassist/bytecode/annotation/MemberValue.java b/src/main/javassist/bytecode/annotation/MemberValue.java index a20a438f..da99885c 100644 --- a/src/main/javassist/bytecode/annotation/MemberValue.java +++ b/src/main/javassist/bytecode/annotation/MemberValue.java @@ -16,14 +16,13 @@ package javassist.bytecode.annotation; +import java.io.IOException; +import java.lang.reflect.Method; + import javassist.ClassPool; import javassist.bytecode.ConstPool; import javassist.bytecode.Descriptor; -import java.io.IOException; -import java.lang.reflect.Array; -import java.lang.reflect.Method; - /** * The value of a member declared in an annotation. * diff --git a/src/main/javassist/bytecode/annotation/ShortMemberValue.java b/src/main/javassist/bytecode/annotation/ShortMemberValue.java index 36c5b08d..277c2820 100644 --- a/src/main/javassist/bytecode/annotation/ShortMemberValue.java +++ b/src/main/javassist/bytecode/annotation/ShortMemberValue.java @@ -16,11 +16,12 @@ package javassist.bytecode.annotation; -import javassist.ClassPool; -import javassist.bytecode.ConstPool; import java.io.IOException; import java.lang.reflect.Method; +import javassist.ClassPool; +import javassist.bytecode.ConstPool; + /** * Short integer constant value. * diff --git a/src/main/javassist/bytecode/annotation/StringMemberValue.java b/src/main/javassist/bytecode/annotation/StringMemberValue.java index 645e78ea..48fe1f6e 100644 --- a/src/main/javassist/bytecode/annotation/StringMemberValue.java +++ b/src/main/javassist/bytecode/annotation/StringMemberValue.java @@ -16,11 +16,12 @@ package javassist.bytecode.annotation; -import javassist.ClassPool; -import javassist.bytecode.ConstPool; import java.io.IOException; import java.lang.reflect.Method; +import javassist.ClassPool; +import javassist.bytecode.ConstPool; + /** * String constant value. * diff --git a/src/main/javassist/bytecode/stackmap/BasicBlock.java b/src/main/javassist/bytecode/stackmap/BasicBlock.java index 60f7c874..231ffc3a 100644 --- a/src/main/javassist/bytecode/stackmap/BasicBlock.java +++ b/src/main/javassist/bytecode/stackmap/BasicBlock.java @@ -16,12 +16,18 @@ package javassist.bytecode.stackmap; -import javassist.bytecode.*; +import java.util.ArrayList; +import java.util.Arrays; import java.util.HashMap; import java.util.List; import java.util.Map; -import java.util.ArrayList; -import java.util.Arrays; + +import javassist.bytecode.BadBytecode; +import javassist.bytecode.CodeAttribute; +import javassist.bytecode.CodeIterator; +import javassist.bytecode.ExceptionTable; +import javassist.bytecode.MethodInfo; +import javassist.bytecode.Opcode; /** * A basic block is a sequence of bytecode that does not contain jump/branch diff --git a/src/main/javassist/bytecode/stackmap/MapMaker.java b/src/main/javassist/bytecode/stackmap/MapMaker.java index 5431f6b7..538fba67 100644 --- a/src/main/javassist/bytecode/stackmap/MapMaker.java +++ b/src/main/javassist/bytecode/stackmap/MapMaker.java @@ -21,7 +21,14 @@ import java.util.List; import javassist.ClassPool; import javassist.NotFoundException; -import javassist.bytecode.*; +import javassist.bytecode.BadBytecode; +import javassist.bytecode.ByteArray; +import javassist.bytecode.Bytecode; +import javassist.bytecode.CodeAttribute; +import javassist.bytecode.ConstPool; +import javassist.bytecode.MethodInfo; +import javassist.bytecode.StackMap; +import javassist.bytecode.StackMapTable; /** * Stack map maker. diff --git a/src/main/javassist/bytecode/stackmap/Tracer.java b/src/main/javassist/bytecode/stackmap/Tracer.java index 224bcc20..6f99e5f7 100644 --- a/src/main/javassist/bytecode/stackmap/Tracer.java +++ b/src/main/javassist/bytecode/stackmap/Tracer.java @@ -16,12 +16,12 @@ package javassist.bytecode.stackmap; +import javassist.ClassPool; +import javassist.bytecode.BadBytecode; import javassist.bytecode.ByteArray; -import javassist.bytecode.Opcode; import javassist.bytecode.ConstPool; import javassist.bytecode.Descriptor; -import javassist.bytecode.BadBytecode; -import javassist.ClassPool; +import javassist.bytecode.Opcode; /* * A class for performing abstract interpretation. diff --git a/src/main/javassist/bytecode/stackmap/TypeData.java b/src/main/javassist/bytecode/stackmap/TypeData.java index 6d225748..9bc837d3 100644 --- a/src/main/javassist/bytecode/stackmap/TypeData.java +++ b/src/main/javassist/bytecode/stackmap/TypeData.java @@ -16,18 +16,19 @@ package javassist.bytecode.stackmap; +import java.util.ArrayList; +import java.util.HashSet; +import java.util.Iterator; +import java.util.List; +import java.util.Set; + import javassist.ClassPool; import javassist.CtClass; import javassist.NotFoundException; +import javassist.bytecode.BadBytecode; import javassist.bytecode.ConstPool; import javassist.bytecode.Descriptor; import javassist.bytecode.StackMapTable; -import javassist.bytecode.BadBytecode; -import java.util.HashSet; -import java.util.Iterator; -import java.util.List; -import java.util.Set; -import java.util.ArrayList; public abstract class TypeData { /* Memo: diff --git a/src/main/javassist/bytecode/stackmap/TypedBlock.java b/src/main/javassist/bytecode/stackmap/TypedBlock.java index 23bdd6f0..14fa7f22 100644 --- a/src/main/javassist/bytecode/stackmap/TypedBlock.java +++ b/src/main/javassist/bytecode/stackmap/TypedBlock.java @@ -16,7 +16,11 @@ package javassist.bytecode.stackmap; -import javassist.bytecode.*; +import javassist.bytecode.AccessFlag; +import javassist.bytecode.BadBytecode; +import javassist.bytecode.CodeAttribute; +import javassist.bytecode.ConstPool; +import javassist.bytecode.MethodInfo; public class TypedBlock extends BasicBlock { public int stackTop, numLocals; diff --git a/src/main/javassist/compiler/AccessorMaker.java b/src/main/javassist/compiler/AccessorMaker.java index d49ea10f..02030c1b 100644 --- a/src/main/javassist/compiler/AccessorMaker.java +++ b/src/main/javassist/compiler/AccessorMaker.java @@ -16,11 +16,23 @@ package javassist.compiler; -import javassist.*; -import javassist.bytecode.*; import java.util.HashMap; import java.util.Map; +import javassist.CannotCompileException; +import javassist.ClassPool; +import javassist.CtClass; +import javassist.NotFoundException; +import javassist.bytecode.AccessFlag; +import javassist.bytecode.Bytecode; +import javassist.bytecode.ClassFile; +import javassist.bytecode.ConstPool; +import javassist.bytecode.Descriptor; +import javassist.bytecode.ExceptionsAttribute; +import javassist.bytecode.FieldInfo; +import javassist.bytecode.MethodInfo; +import javassist.bytecode.SyntheticAttribute; + /** * AccessorMaker maintains accessors to private members of an enclosing * class. It is necessary for compiling a method in an inner class. diff --git a/src/main/javassist/compiler/CodeGen.java b/src/main/javassist/compiler/CodeGen.java index b77ac2dc..d4c748f8 100644 --- a/src/main/javassist/compiler/CodeGen.java +++ b/src/main/javassist/compiler/CodeGen.java @@ -20,8 +20,32 @@ import java.util.ArrayList; import java.util.Arrays; import java.util.List; -import javassist.compiler.ast.*; -import javassist.bytecode.*; +import javassist.bytecode.Bytecode; +import javassist.bytecode.Opcode; +import javassist.compiler.ast.ASTList; +import javassist.compiler.ast.ASTree; +import javassist.compiler.ast.ArrayInit; +import javassist.compiler.ast.AssignExpr; +import javassist.compiler.ast.BinExpr; +import javassist.compiler.ast.CallExpr; +import javassist.compiler.ast.CastExpr; +import javassist.compiler.ast.CondExpr; +import javassist.compiler.ast.Declarator; +import javassist.compiler.ast.DoubleConst; +import javassist.compiler.ast.Expr; +import javassist.compiler.ast.FieldDecl; +import javassist.compiler.ast.InstanceOfExpr; +import javassist.compiler.ast.IntConst; +import javassist.compiler.ast.Keyword; +import javassist.compiler.ast.Member; +import javassist.compiler.ast.MethodDecl; +import javassist.compiler.ast.NewExpr; +import javassist.compiler.ast.Pair; +import javassist.compiler.ast.Stmnt; +import javassist.compiler.ast.StringL; +import javassist.compiler.ast.Symbol; +import javassist.compiler.ast.Variable; +import javassist.compiler.ast.Visitor; /* The code generator is implemented by three files: * CodeGen.java, MemberCodeGen.java, and JvstCodeGen. diff --git a/src/main/javassist/compiler/Javac.java b/src/main/javassist/compiler/Javac.java index ef2caac9..084487b4 100644 --- a/src/main/javassist/compiler/Javac.java +++ b/src/main/javassist/compiler/Javac.java @@ -16,23 +16,31 @@ package javassist.compiler; +import javassist.CannotCompileException; +import javassist.CtBehavior; import javassist.CtClass; -import javassist.CtPrimitiveType; -import javassist.CtMember; +import javassist.CtConstructor; import javassist.CtField; -import javassist.CtBehavior; +import javassist.CtMember; import javassist.CtMethod; -import javassist.CtConstructor; -import javassist.CannotCompileException; +import javassist.CtPrimitiveType; import javassist.Modifier; +import javassist.NotFoundException; +import javassist.bytecode.BadBytecode; import javassist.bytecode.Bytecode; import javassist.bytecode.CodeAttribute; import javassist.bytecode.LocalVariableAttribute; -import javassist.bytecode.BadBytecode; import javassist.bytecode.Opcode; -import javassist.NotFoundException; - -import javassist.compiler.ast.*; +import javassist.compiler.ast.ASTList; +import javassist.compiler.ast.ASTree; +import javassist.compiler.ast.CallExpr; +import javassist.compiler.ast.Declarator; +import javassist.compiler.ast.Expr; +import javassist.compiler.ast.FieldDecl; +import javassist.compiler.ast.Member; +import javassist.compiler.ast.MethodDecl; +import javassist.compiler.ast.Stmnt; +import javassist.compiler.ast.Symbol; public class Javac { JvstCodeGen gen; diff --git a/src/main/javassist/compiler/JvstCodeGen.java b/src/main/javassist/compiler/JvstCodeGen.java index 1032c7d4..5a43d65e 100644 --- a/src/main/javassist/compiler/JvstCodeGen.java +++ b/src/main/javassist/compiler/JvstCodeGen.java @@ -16,9 +16,21 @@ package javassist.compiler; -import javassist.*; -import javassist.bytecode.*; -import javassist.compiler.ast.*; +import javassist.ClassPool; +import javassist.CtClass; +import javassist.CtPrimitiveType; +import javassist.NotFoundException; +import javassist.bytecode.Bytecode; +import javassist.bytecode.Descriptor; +import javassist.compiler.ast.ASTList; +import javassist.compiler.ast.ASTree; +import javassist.compiler.ast.CallExpr; +import javassist.compiler.ast.CastExpr; +import javassist.compiler.ast.Declarator; +import javassist.compiler.ast.Expr; +import javassist.compiler.ast.Member; +import javassist.compiler.ast.Stmnt; +import javassist.compiler.ast.Symbol; /* Code generator accepting extended Java syntax for Javassist. */ diff --git a/src/main/javassist/compiler/JvstTypeChecker.java b/src/main/javassist/compiler/JvstTypeChecker.java index 4105b1f5..13e47291 100644 --- a/src/main/javassist/compiler/JvstTypeChecker.java +++ b/src/main/javassist/compiler/JvstTypeChecker.java @@ -16,8 +16,17 @@ package javassist.compiler; -import javassist.*; -import javassist.compiler.ast.*; +import javassist.ClassPool; +import javassist.CtClass; +import javassist.CtPrimitiveType; +import javassist.NotFoundException; +import javassist.compiler.ast.ASTList; +import javassist.compiler.ast.ASTree; +import javassist.compiler.ast.CallExpr; +import javassist.compiler.ast.CastExpr; +import javassist.compiler.ast.Expr; +import javassist.compiler.ast.Member; +import javassist.compiler.ast.Symbol; /* Type checker accepting extended Java syntax for Javassist. */ diff --git a/src/main/javassist/compiler/MemberCodeGen.java b/src/main/javassist/compiler/MemberCodeGen.java index df31b8f3..ad254816 100644 --- a/src/main/javassist/compiler/MemberCodeGen.java +++ b/src/main/javassist/compiler/MemberCodeGen.java @@ -16,13 +16,37 @@ package javassist.compiler; -import javassist.*; -import javassist.bytecode.*; -import javassist.compiler.ast.*; - import java.util.ArrayList; import java.util.List; +import javassist.ClassPool; +import javassist.CtClass; +import javassist.CtField; +import javassist.CtMethod; +import javassist.Modifier; +import javassist.NotFoundException; +import javassist.bytecode.AccessFlag; +import javassist.bytecode.Bytecode; +import javassist.bytecode.ClassFile; +import javassist.bytecode.ConstPool; +import javassist.bytecode.Descriptor; +import javassist.bytecode.FieldInfo; +import javassist.bytecode.MethodInfo; +import javassist.bytecode.Opcode; +import javassist.compiler.ast.ASTList; +import javassist.compiler.ast.ASTree; +import javassist.compiler.ast.ArrayInit; +import javassist.compiler.ast.CallExpr; +import javassist.compiler.ast.Declarator; +import javassist.compiler.ast.Expr; +import javassist.compiler.ast.Keyword; +import javassist.compiler.ast.Member; +import javassist.compiler.ast.MethodDecl; +import javassist.compiler.ast.NewExpr; +import javassist.compiler.ast.Pair; +import javassist.compiler.ast.Stmnt; +import javassist.compiler.ast.Symbol; + /* Code generator methods depending on javassist.* classes. */ public class MemberCodeGen extends CodeGen { diff --git a/src/main/javassist/compiler/MemberResolver.java b/src/main/javassist/compiler/MemberResolver.java index 94a014f6..00dac6c1 100644 --- a/src/main/javassist/compiler/MemberResolver.java +++ b/src/main/javassist/compiler/MemberResolver.java @@ -16,17 +16,28 @@ package javassist.compiler; -import java.util.Hashtable; import java.lang.ref.Reference; import java.lang.ref.WeakReference; -import java.util.WeakHashMap; +import java.util.Hashtable; +import java.util.Iterator; import java.util.List; import java.util.Map; -import java.util.Iterator; +import java.util.WeakHashMap; -import javassist.*; -import javassist.bytecode.*; -import javassist.compiler.ast.*; +import javassist.ClassPool; +import javassist.CtClass; +import javassist.CtField; +import javassist.Modifier; +import javassist.NotFoundException; +import javassist.bytecode.AccessFlag; +import javassist.bytecode.ClassFile; +import javassist.bytecode.Descriptor; +import javassist.bytecode.MethodInfo; +import javassist.compiler.ast.ASTList; +import javassist.compiler.ast.ASTree; +import javassist.compiler.ast.Declarator; +import javassist.compiler.ast.Keyword; +import javassist.compiler.ast.Symbol; /* Code generator methods depending on javassist.* classes. */ diff --git a/src/main/javassist/compiler/Parser.java b/src/main/javassist/compiler/Parser.java index 6ce4cdb0..c67d49ec 100644 --- a/src/main/javassist/compiler/Parser.java +++ b/src/main/javassist/compiler/Parser.java @@ -16,7 +16,29 @@ package javassist.compiler; -import javassist.compiler.ast.*; +import javassist.compiler.ast.ASTList; +import javassist.compiler.ast.ASTree; +import javassist.compiler.ast.ArrayInit; +import javassist.compiler.ast.AssignExpr; +import javassist.compiler.ast.BinExpr; +import javassist.compiler.ast.CallExpr; +import javassist.compiler.ast.CastExpr; +import javassist.compiler.ast.CondExpr; +import javassist.compiler.ast.Declarator; +import javassist.compiler.ast.DoubleConst; +import javassist.compiler.ast.Expr; +import javassist.compiler.ast.FieldDecl; +import javassist.compiler.ast.InstanceOfExpr; +import javassist.compiler.ast.IntConst; +import javassist.compiler.ast.Keyword; +import javassist.compiler.ast.Member; +import javassist.compiler.ast.MethodDecl; +import javassist.compiler.ast.NewExpr; +import javassist.compiler.ast.Pair; +import javassist.compiler.ast.Stmnt; +import javassist.compiler.ast.StringL; +import javassist.compiler.ast.Symbol; +import javassist.compiler.ast.Variable; public final class Parser implements TokenId { private Lex lex; diff --git a/src/main/javassist/compiler/SymbolTable.java b/src/main/javassist/compiler/SymbolTable.java index a8134f9a..e23f8ac7 100644 --- a/src/main/javassist/compiler/SymbolTable.java +++ b/src/main/javassist/compiler/SymbolTable.java @@ -17,6 +17,7 @@ package javassist.compiler; import java.util.HashMap; + import javassist.compiler.ast.Declarator; public final class SymbolTable extends HashMap { diff --git a/src/main/javassist/compiler/TypeChecker.java b/src/main/javassist/compiler/TypeChecker.java index c76cb175..9e01d0a1 100644 --- a/src/main/javassist/compiler/TypeChecker.java +++ b/src/main/javassist/compiler/TypeChecker.java @@ -16,13 +16,34 @@ package javassist.compiler; +import javassist.ClassPool; import javassist.CtClass; import javassist.CtField; -import javassist.ClassPool; import javassist.Modifier; import javassist.NotFoundException; -import javassist.compiler.ast.*; -import javassist.bytecode.*; +import javassist.bytecode.FieldInfo; +import javassist.bytecode.MethodInfo; +import javassist.bytecode.Opcode; +import javassist.compiler.ast.ASTList; +import javassist.compiler.ast.ASTree; +import javassist.compiler.ast.ArrayInit; +import javassist.compiler.ast.AssignExpr; +import javassist.compiler.ast.BinExpr; +import javassist.compiler.ast.CallExpr; +import javassist.compiler.ast.CastExpr; +import javassist.compiler.ast.CondExpr; +import javassist.compiler.ast.Declarator; +import javassist.compiler.ast.DoubleConst; +import javassist.compiler.ast.Expr; +import javassist.compiler.ast.InstanceOfExpr; +import javassist.compiler.ast.IntConst; +import javassist.compiler.ast.Keyword; +import javassist.compiler.ast.Member; +import javassist.compiler.ast.NewExpr; +import javassist.compiler.ast.StringL; +import javassist.compiler.ast.Symbol; +import javassist.compiler.ast.Variable; +import javassist.compiler.ast.Visitor; public class TypeChecker extends Visitor implements Opcode, TokenId { static final String javaLangObject = "java.lang.Object"; diff --git a/src/main/javassist/compiler/ast/ASTree.java b/src/main/javassist/compiler/ast/ASTree.java index 950ded8e..7fd05fd4 100644 --- a/src/main/javassist/compiler/ast/ASTree.java +++ b/src/main/javassist/compiler/ast/ASTree.java @@ -17,6 +17,7 @@ package javassist.compiler.ast; import java.io.Serializable; + import javassist.compiler.CompileError; /** diff --git a/src/main/javassist/compiler/ast/CallExpr.java b/src/main/javassist/compiler/ast/CallExpr.java index dab3e867..395915ed 100644 --- a/src/main/javassist/compiler/ast/CallExpr.java +++ b/src/main/javassist/compiler/ast/CallExpr.java @@ -17,8 +17,8 @@ package javassist.compiler.ast; import javassist.compiler.CompileError; -import javassist.compiler.TokenId; import javassist.compiler.MemberResolver; +import javassist.compiler.TokenId; /** * Method call expression. diff --git a/src/main/javassist/compiler/ast/CastExpr.java b/src/main/javassist/compiler/ast/CastExpr.java index e3a01efa..903e5bbd 100644 --- a/src/main/javassist/compiler/ast/CastExpr.java +++ b/src/main/javassist/compiler/ast/CastExpr.java @@ -16,8 +16,8 @@ package javassist.compiler.ast; -import javassist.compiler.TokenId; import javassist.compiler.CompileError; +import javassist.compiler.TokenId; /** * Cast expression. diff --git a/src/main/javassist/compiler/ast/Declarator.java b/src/main/javassist/compiler/ast/Declarator.java index f976d94e..24170db0 100644 --- a/src/main/javassist/compiler/ast/Declarator.java +++ b/src/main/javassist/compiler/ast/Declarator.java @@ -16,8 +16,8 @@ package javassist.compiler.ast; -import javassist.compiler.TokenId; import javassist.compiler.CompileError; +import javassist.compiler.TokenId; /** * Variable declarator. diff --git a/src/main/javassist/compiler/ast/Expr.java b/src/main/javassist/compiler/ast/Expr.java index 59e1d236..ed5cb60b 100644 --- a/src/main/javassist/compiler/ast/Expr.java +++ b/src/main/javassist/compiler/ast/Expr.java @@ -16,8 +16,8 @@ package javassist.compiler.ast; -import javassist.compiler.TokenId; import javassist.compiler.CompileError; +import javassist.compiler.TokenId; /** * Expression. diff --git a/src/main/javassist/compiler/ast/Member.java b/src/main/javassist/compiler/ast/Member.java index 1a29a86b..192c9ef3 100644 --- a/src/main/javassist/compiler/ast/Member.java +++ b/src/main/javassist/compiler/ast/Member.java @@ -16,8 +16,8 @@ package javassist.compiler.ast; -import javassist.compiler.CompileError; import javassist.CtField; +import javassist.compiler.CompileError; /** * Member name. diff --git a/src/main/javassist/compiler/ast/NewExpr.java b/src/main/javassist/compiler/ast/NewExpr.java index e21cb850..44b264c0 100644 --- a/src/main/javassist/compiler/ast/NewExpr.java +++ b/src/main/javassist/compiler/ast/NewExpr.java @@ -16,8 +16,8 @@ package javassist.compiler.ast; -import javassist.compiler.TokenId; import javassist.compiler.CompileError; +import javassist.compiler.TokenId; /** * New Expression. diff --git a/src/main/javassist/compiler/ast/Stmnt.java b/src/main/javassist/compiler/ast/Stmnt.java index 8bcf3a80..c5aa5df3 100644 --- a/src/main/javassist/compiler/ast/Stmnt.java +++ b/src/main/javassist/compiler/ast/Stmnt.java @@ -16,8 +16,8 @@ package javassist.compiler.ast; -import javassist.compiler.TokenId; import javassist.compiler.CompileError; +import javassist.compiler.TokenId; /** * Statement. diff --git a/src/main/javassist/convert/TransformAccessArrayField.java b/src/main/javassist/convert/TransformAccessArrayField.java index 6e5b14cc..6dab42a5 100644 --- a/src/main/javassist/convert/TransformAccessArrayField.java +++ b/src/main/javassist/convert/TransformAccessArrayField.java @@ -16,9 +16,9 @@ package javassist.convert; import javassist.CannotCompileException; +import javassist.CodeConverter.ArrayAccessReplacementMethodNames; import javassist.CtClass; import javassist.NotFoundException; -import javassist.CodeConverter.ArrayAccessReplacementMethodNames; import javassist.bytecode.BadBytecode; import javassist.bytecode.CodeIterator; import javassist.bytecode.ConstPool; diff --git a/src/main/javassist/convert/TransformAfter.java b/src/main/javassist/convert/TransformAfter.java index 87dfd919..30086099 100644 --- a/src/main/javassist/convert/TransformAfter.java +++ b/src/main/javassist/convert/TransformAfter.java @@ -18,7 +18,8 @@ package javassist.convert; import javassist.CtMethod; import javassist.NotFoundException; -import javassist.bytecode.*; +import javassist.bytecode.BadBytecode; +import javassist.bytecode.CodeIterator; public class TransformAfter extends TransformBefore { public TransformAfter(Transformer next, diff --git a/src/main/javassist/convert/TransformBefore.java b/src/main/javassist/convert/TransformBefore.java index 1254f77f..6471b205 100644 --- a/src/main/javassist/convert/TransformBefore.java +++ b/src/main/javassist/convert/TransformBefore.java @@ -19,7 +19,12 @@ package javassist.convert; import javassist.CtClass; import javassist.CtMethod; import javassist.NotFoundException; -import javassist.bytecode.*; +import javassist.bytecode.BadBytecode; +import javassist.bytecode.Bytecode; +import javassist.bytecode.CodeAttribute; +import javassist.bytecode.CodeIterator; +import javassist.bytecode.ConstPool; +import javassist.bytecode.Descriptor; public class TransformBefore extends TransformCall { protected CtClass[] parameterTypes; diff --git a/src/main/javassist/convert/TransformCall.java b/src/main/javassist/convert/TransformCall.java index 231fdf3b..fefbe8ae 100644 --- a/src/main/javassist/convert/TransformCall.java +++ b/src/main/javassist/convert/TransformCall.java @@ -16,12 +16,15 @@ package javassist.convert; +import javassist.ClassPool; import javassist.CtClass; import javassist.CtMethod; -import javassist.ClassPool; import javassist.Modifier; import javassist.NotFoundException; -import javassist.bytecode.*; +import javassist.bytecode.BadBytecode; +import javassist.bytecode.CodeAttribute; +import javassist.bytecode.CodeIterator; +import javassist.bytecode.ConstPool; public class TransformCall extends Transformer { protected String classname, methodname, methodDescriptor; diff --git a/src/main/javassist/convert/TransformFieldAccess.java b/src/main/javassist/convert/TransformFieldAccess.java index 5b638fc2..681acc52 100644 --- a/src/main/javassist/convert/TransformFieldAccess.java +++ b/src/main/javassist/convert/TransformFieldAccess.java @@ -16,10 +16,12 @@ package javassist.convert; -import javassist.bytecode.*; import javassist.CtClass; import javassist.CtField; import javassist.Modifier; +import javassist.bytecode.CodeAttribute; +import javassist.bytecode.CodeIterator; +import javassist.bytecode.ConstPool; final public class TransformFieldAccess extends Transformer { private String newClassname, newFieldname; diff --git a/src/main/javassist/convert/TransformNew.java b/src/main/javassist/convert/TransformNew.java index 90990fd2..23c9c7a9 100644 --- a/src/main/javassist/convert/TransformNew.java +++ b/src/main/javassist/convert/TransformNew.java @@ -16,9 +16,14 @@ package javassist.convert; -import javassist.bytecode.*; -import javassist.CtClass; import javassist.CannotCompileException; +import javassist.CtClass; +import javassist.bytecode.CodeAttribute; +import javassist.bytecode.CodeIterator; +import javassist.bytecode.ConstPool; +import javassist.bytecode.Descriptor; +import javassist.bytecode.StackMap; +import javassist.bytecode.StackMapTable; final public class TransformNew extends Transformer { private int nested; diff --git a/src/main/javassist/convert/TransformNewClass.java b/src/main/javassist/convert/TransformNewClass.java index 994ff70a..83f2a0cc 100644 --- a/src/main/javassist/convert/TransformNewClass.java +++ b/src/main/javassist/convert/TransformNewClass.java @@ -16,9 +16,11 @@ package javassist.convert; -import javassist.bytecode.*; -import javassist.CtClass; import javassist.CannotCompileException; +import javassist.CtClass; +import javassist.bytecode.CodeAttribute; +import javassist.bytecode.CodeIterator; +import javassist.bytecode.ConstPool; final public class TransformNewClass extends Transformer { private int nested; diff --git a/src/main/javassist/convert/TransformReadField.java b/src/main/javassist/convert/TransformReadField.java index a18e78f9..e5e373c9 100644 --- a/src/main/javassist/convert/TransformReadField.java +++ b/src/main/javassist/convert/TransformReadField.java @@ -16,12 +16,14 @@ package javassist.convert; -import javassist.bytecode.*; import javassist.ClassPool; import javassist.CtClass; import javassist.CtField; -import javassist.NotFoundException; import javassist.Modifier; +import javassist.NotFoundException; +import javassist.bytecode.BadBytecode; +import javassist.bytecode.CodeIterator; +import javassist.bytecode.ConstPool; public class TransformReadField extends Transformer { protected String fieldname; diff --git a/src/main/javassist/convert/TransformWriteField.java b/src/main/javassist/convert/TransformWriteField.java index 3e15b761..dd3ddb12 100644 --- a/src/main/javassist/convert/TransformWriteField.java +++ b/src/main/javassist/convert/TransformWriteField.java @@ -18,7 +18,10 @@ package javassist.convert; import javassist.CtClass; import javassist.CtField; -import javassist.bytecode.*; +import javassist.bytecode.BadBytecode; +import javassist.bytecode.CodeAttribute; +import javassist.bytecode.CodeIterator; +import javassist.bytecode.ConstPool; final public class TransformWriteField extends TransformReadField { public TransformWriteField(Transformer next, CtField field, diff --git a/src/main/javassist/expr/Cast.java b/src/main/javassist/expr/Cast.java index 1d61d4b3..31522e5a 100644 --- a/src/main/javassist/expr/Cast.java +++ b/src/main/javassist/expr/Cast.java @@ -16,9 +16,23 @@ package javassist.expr; -import javassist.*; -import javassist.bytecode.*; -import javassist.compiler.*; +import javassist.CannotCompileException; +import javassist.ClassPool; +import javassist.CtBehavior; +import javassist.CtClass; +import javassist.NotFoundException; +import javassist.bytecode.BadBytecode; +import javassist.bytecode.Bytecode; +import javassist.bytecode.CodeAttribute; +import javassist.bytecode.CodeIterator; +import javassist.bytecode.ConstPool; +import javassist.bytecode.MethodInfo; +import javassist.bytecode.Opcode; +import javassist.compiler.CompileError; +import javassist.compiler.Javac; +import javassist.compiler.JvstCodeGen; +import javassist.compiler.JvstTypeChecker; +import javassist.compiler.ProceedHandler; import javassist.compiler.ast.ASTList; /** diff --git a/src/main/javassist/expr/Expr.java b/src/main/javassist/expr/Expr.java index c3d42364..aea43d55 100644 --- a/src/main/javassist/expr/Expr.java +++ b/src/main/javassist/expr/Expr.java @@ -16,6 +16,9 @@ package javassist.expr; +import java.util.LinkedList; +import java.util.List; + import javassist.CannotCompileException; import javassist.ClassPool; import javassist.CtBehavior; @@ -36,9 +39,6 @@ import javassist.bytecode.MethodInfo; import javassist.bytecode.Opcode; import javassist.compiler.Javac; -import java.util.LinkedList; -import java.util.List; - /** * Expression. */ diff --git a/src/main/javassist/expr/ExprEditor.java b/src/main/javassist/expr/ExprEditor.java index 6c9814d3..0b3f934e 100644 --- a/src/main/javassist/expr/ExprEditor.java +++ b/src/main/javassist/expr/ExprEditor.java @@ -16,9 +16,14 @@ package javassist.expr; -import javassist.bytecode.*; -import javassist.CtClass; import javassist.CannotCompileException; +import javassist.CtClass; +import javassist.bytecode.BadBytecode; +import javassist.bytecode.CodeAttribute; +import javassist.bytecode.CodeIterator; +import javassist.bytecode.ExceptionTable; +import javassist.bytecode.MethodInfo; +import javassist.bytecode.Opcode; /** * A translator of method bodies. diff --git a/src/main/javassist/expr/FieldAccess.java b/src/main/javassist/expr/FieldAccess.java index 44fa8b0a..335314a5 100644 --- a/src/main/javassist/expr/FieldAccess.java +++ b/src/main/javassist/expr/FieldAccess.java @@ -16,9 +16,26 @@ package javassist.expr; -import javassist.*; -import javassist.bytecode.*; -import javassist.compiler.*; +import javassist.CannotCompileException; +import javassist.ClassPool; +import javassist.CtBehavior; +import javassist.CtClass; +import javassist.CtField; +import javassist.CtPrimitiveType; +import javassist.NotFoundException; +import javassist.bytecode.BadBytecode; +import javassist.bytecode.Bytecode; +import javassist.bytecode.CodeAttribute; +import javassist.bytecode.CodeIterator; +import javassist.bytecode.ConstPool; +import javassist.bytecode.Descriptor; +import javassist.bytecode.MethodInfo; +import javassist.bytecode.Opcode; +import javassist.compiler.CompileError; +import javassist.compiler.Javac; +import javassist.compiler.JvstCodeGen; +import javassist.compiler.JvstTypeChecker; +import javassist.compiler.ProceedHandler; import javassist.compiler.ast.ASTList; /** diff --git a/src/main/javassist/expr/Handler.java b/src/main/javassist/expr/Handler.java index 74862e00..1839abca 100644 --- a/src/main/javassist/expr/Handler.java +++ b/src/main/javassist/expr/Handler.java @@ -16,9 +16,19 @@ package javassist.expr; -import javassist.*; -import javassist.bytecode.*; -import javassist.compiler.*; +import javassist.CannotCompileException; +import javassist.CtBehavior; +import javassist.CtClass; +import javassist.NotFoundException; +import javassist.bytecode.Bytecode; +import javassist.bytecode.CodeAttribute; +import javassist.bytecode.CodeIterator; +import javassist.bytecode.ConstPool; +import javassist.bytecode.ExceptionTable; +import javassist.bytecode.MethodInfo; +import javassist.bytecode.Opcode; +import javassist.compiler.CompileError; +import javassist.compiler.Javac; /** * A catch clause or a finally block. diff --git a/src/main/javassist/expr/Instanceof.java b/src/main/javassist/expr/Instanceof.java index 868ce663..a046ddbc 100644 --- a/src/main/javassist/expr/Instanceof.java +++ b/src/main/javassist/expr/Instanceof.java @@ -16,9 +16,23 @@ package javassist.expr; -import javassist.*; -import javassist.bytecode.*; -import javassist.compiler.*; +import javassist.CannotCompileException; +import javassist.ClassPool; +import javassist.CtBehavior; +import javassist.CtClass; +import javassist.NotFoundException; +import javassist.bytecode.BadBytecode; +import javassist.bytecode.Bytecode; +import javassist.bytecode.CodeAttribute; +import javassist.bytecode.CodeIterator; +import javassist.bytecode.ConstPool; +import javassist.bytecode.MethodInfo; +import javassist.bytecode.Opcode; +import javassist.compiler.CompileError; +import javassist.compiler.Javac; +import javassist.compiler.JvstCodeGen; +import javassist.compiler.JvstTypeChecker; +import javassist.compiler.ProceedHandler; import javassist.compiler.ast.ASTList; /** diff --git a/src/main/javassist/expr/MethodCall.java b/src/main/javassist/expr/MethodCall.java index c638479e..66ddeadd 100644 --- a/src/main/javassist/expr/MethodCall.java +++ b/src/main/javassist/expr/MethodCall.java @@ -16,9 +16,21 @@ package javassist.expr; -import javassist.*; -import javassist.bytecode.*; -import javassist.compiler.*; +import javassist.CannotCompileException; +import javassist.ClassPool; +import javassist.CtBehavior; +import javassist.CtClass; +import javassist.CtMethod; +import javassist.NotFoundException; +import javassist.bytecode.BadBytecode; +import javassist.bytecode.Bytecode; +import javassist.bytecode.CodeAttribute; +import javassist.bytecode.CodeIterator; +import javassist.bytecode.ConstPool; +import javassist.bytecode.Descriptor; +import javassist.bytecode.MethodInfo; +import javassist.compiler.CompileError; +import javassist.compiler.Javac; /** * Method invocation (caller-side expression). diff --git a/src/main/javassist/expr/NewArray.java b/src/main/javassist/expr/NewArray.java index cf31567d..70d74afd 100644 --- a/src/main/javassist/expr/NewArray.java +++ b/src/main/javassist/expr/NewArray.java @@ -16,9 +16,24 @@ package javassist.expr; -import javassist.*; -import javassist.bytecode.*; -import javassist.compiler.*; +import javassist.CannotCompileException; +import javassist.CtBehavior; +import javassist.CtClass; +import javassist.CtPrimitiveType; +import javassist.NotFoundException; +import javassist.bytecode.BadBytecode; +import javassist.bytecode.Bytecode; +import javassist.bytecode.CodeAttribute; +import javassist.bytecode.CodeIterator; +import javassist.bytecode.ConstPool; +import javassist.bytecode.Descriptor; +import javassist.bytecode.MethodInfo; +import javassist.bytecode.Opcode; +import javassist.compiler.CompileError; +import javassist.compiler.Javac; +import javassist.compiler.JvstCodeGen; +import javassist.compiler.JvstTypeChecker; +import javassist.compiler.ProceedHandler; import javassist.compiler.ast.ASTList; /** diff --git a/src/main/javassist/expr/NewExpr.java b/src/main/javassist/expr/NewExpr.java index 9c7b6e0d..6b28475b 100644 --- a/src/main/javassist/expr/NewExpr.java +++ b/src/main/javassist/expr/NewExpr.java @@ -16,9 +16,25 @@ package javassist.expr; -import javassist.*; -import javassist.bytecode.*; -import javassist.compiler.*; +import javassist.CannotCompileException; +import javassist.ClassPool; +import javassist.CtBehavior; +import javassist.CtClass; +import javassist.CtConstructor; +import javassist.NotFoundException; +import javassist.bytecode.BadBytecode; +import javassist.bytecode.Bytecode; +import javassist.bytecode.CodeAttribute; +import javassist.bytecode.CodeIterator; +import javassist.bytecode.ConstPool; +import javassist.bytecode.Descriptor; +import javassist.bytecode.MethodInfo; +import javassist.bytecode.Opcode; +import javassist.compiler.CompileError; +import javassist.compiler.Javac; +import javassist.compiler.JvstCodeGen; +import javassist.compiler.JvstTypeChecker; +import javassist.compiler.ProceedHandler; import javassist.compiler.ast.ASTList; /** diff --git a/src/main/javassist/tools/Callback.java b/src/main/javassist/tools/Callback.java index 058b6931..c0c88094 100644 --- a/src/main/javassist/tools/Callback.java +++ b/src/main/javassist/tools/Callback.java @@ -16,13 +16,13 @@ package javassist.tools; -import javassist.CannotCompileException; -import javassist.CtBehavior; - import java.util.HashMap; import java.util.Map; import java.util.UUID; +import javassist.CannotCompileException; +import javassist.CtBehavior; + /** * Creates bytecode that when executed calls back to the instance's result method. * diff --git a/src/main/javassist/tools/Dump.java b/src/main/javassist/tools/Dump.java index b22825e0..d6722713 100644 --- a/src/main/javassist/tools/Dump.java +++ b/src/main/javassist/tools/Dump.java @@ -16,7 +16,10 @@ package javassist.tools; -import java.io.*; +import java.io.DataInputStream; +import java.io.FileInputStream; +import java.io.PrintWriter; + import javassist.bytecode.ClassFile; import javassist.bytecode.ClassFilePrinter; diff --git a/src/main/javassist/tools/reflect/CannotInvokeException.java b/src/main/javassist/tools/reflect/CannotInvokeException.java index c1f86958..a9d05247 100644 --- a/src/main/javassist/tools/reflect/CannotInvokeException.java +++ b/src/main/javassist/tools/reflect/CannotInvokeException.java @@ -17,7 +17,6 @@ package javassist.tools.reflect; import java.lang.reflect.InvocationTargetException; -import java.lang.IllegalAccessException; /** * Thrown when method invocation using the reflection API has thrown diff --git a/src/main/javassist/tools/reflect/CannotReflectException.java b/src/main/javassist/tools/reflect/CannotReflectException.java index c7179545..dc907107 100644 --- a/src/main/javassist/tools/reflect/CannotReflectException.java +++ b/src/main/javassist/tools/reflect/CannotReflectException.java @@ -17,6 +17,7 @@ package javassist.tools.reflect; import javassist.CannotCompileException; +import javassist.CtClass; /** * Thrown by makeReflective() in Reflection diff --git a/src/main/javassist/tools/reflect/ClassMetaobject.java b/src/main/javassist/tools/reflect/ClassMetaobject.java index cae5aefa..a00622c5 100644 --- a/src/main/javassist/tools/reflect/ClassMetaobject.java +++ b/src/main/javassist/tools/reflect/ClassMetaobject.java @@ -16,12 +16,14 @@ package javassist.tools.reflect; -import java.lang.reflect.*; -import java.util.Arrays; -import java.io.Serializable; import java.io.IOException; import java.io.ObjectInputStream; import java.io.ObjectOutputStream; +import java.io.Serializable; +import java.lang.reflect.Constructor; +import java.lang.reflect.InvocationTargetException; +import java.lang.reflect.Method; +import java.util.Arrays; /** * A runtime class metaobject. diff --git a/src/main/javassist/tools/reflect/Compiler.java b/src/main/javassist/tools/reflect/Compiler.java index 3114fd89..b919684b 100644 --- a/src/main/javassist/tools/reflect/Compiler.java +++ b/src/main/javassist/tools/reflect/Compiler.java @@ -16,10 +16,11 @@ package javassist.tools.reflect; -import javassist.CtClass; -import javassist.ClassPool; import java.io.PrintStream; +import javassist.ClassPool; +import javassist.CtClass; + class CompiledClass { public String classname; public String metaobject; diff --git a/src/main/javassist/tools/reflect/Loader.java b/src/main/javassist/tools/reflect/Loader.java index ad4dfa55..f144877f 100644 --- a/src/main/javassist/tools/reflect/Loader.java +++ b/src/main/javassist/tools/reflect/Loader.java @@ -17,8 +17,8 @@ package javassist.tools.reflect; import javassist.CannotCompileException; -import javassist.NotFoundException; import javassist.ClassPool; +import javassist.NotFoundException; /** * A class loader for reflection. diff --git a/src/main/javassist/tools/reflect/Metaobject.java b/src/main/javassist/tools/reflect/Metaobject.java index a4c9df56..d3adcb13 100644 --- a/src/main/javassist/tools/reflect/Metaobject.java +++ b/src/main/javassist/tools/reflect/Metaobject.java @@ -16,11 +16,11 @@ package javassist.tools.reflect; -import java.lang.reflect.Method; -import java.io.Serializable; import java.io.IOException; import java.io.ObjectInputStream; import java.io.ObjectOutputStream; +import java.io.Serializable; +import java.lang.reflect.Method; /** * A runtime metaobject. diff --git a/src/main/javassist/tools/reflect/Reflection.java b/src/main/javassist/tools/reflect/Reflection.java index b195a6e5..dddd9a41 100644 --- a/src/main/javassist/tools/reflect/Reflection.java +++ b/src/main/javassist/tools/reflect/Reflection.java @@ -16,10 +16,19 @@ package javassist.tools.reflect; -import javassist.*; +import javassist.CannotCompileException; +import javassist.ClassPool; +import javassist.CodeConverter; +import javassist.CtClass; +import javassist.CtField; +import javassist.CtMethod; import javassist.CtMethod.ConstParameter; -import javassist.bytecode.ClassFile; +import javassist.CtNewMethod; +import javassist.Modifier; +import javassist.NotFoundException; +import javassist.Translator; import javassist.bytecode.BadBytecode; +import javassist.bytecode.ClassFile; import javassist.bytecode.MethodInfo; /** diff --git a/src/main/javassist/tools/rmi/AppletServer.java b/src/main/javassist/tools/rmi/AppletServer.java index c6ed1099..e49ed0dc 100644 --- a/src/main/javassist/tools/rmi/AppletServer.java +++ b/src/main/javassist/tools/rmi/AppletServer.java @@ -16,18 +16,26 @@ package javassist.tools.rmi; -import java.io.*; - -import javassist.tools.web.*; -import javassist.CannotCompileException; -import javassist.NotFoundException; -import javassist.ClassPool; +import java.io.DataInputStream; +import java.io.IOException; +import java.io.InputStream; +import java.io.InvalidClassException; +import java.io.NotSerializableException; +import java.io.ObjectInputStream; +import java.io.ObjectOutputStream; +import java.io.OutputStream; import java.lang.reflect.Method; import java.util.Hashtable; import java.util.List; import java.util.Map; import java.util.Vector; +import javassist.CannotCompileException; +import javassist.ClassPool; +import javassist.NotFoundException; +import javassist.tools.web.BadHttpRequest; +import javassist.tools.web.Webserver; + /** * An AppletServer object is a web server that an ObjectImporter * communicates with. It makes the objects specified by diff --git a/src/main/javassist/tools/rmi/ObjectImporter.java b/src/main/javassist/tools/rmi/ObjectImporter.java index 7505d9ea..798279af 100644 --- a/src/main/javassist/tools/rmi/ObjectImporter.java +++ b/src/main/javassist/tools/rmi/ObjectImporter.java @@ -16,9 +16,16 @@ package javassist.tools.rmi; -import java.io.*; -import java.net.*; -import java.lang.reflect.*; +import java.io.BufferedInputStream; +import java.io.BufferedOutputStream; +import java.io.IOException; +import java.io.InputStream; +import java.io.ObjectInputStream; +import java.io.ObjectOutputStream; +import java.io.OutputStream; +import java.lang.reflect.Constructor; +import java.net.Socket; +import java.net.URL; /** * The object importer enables applets to call a method on a remote diff --git a/src/main/javassist/tools/rmi/StubGenerator.java b/src/main/javassist/tools/rmi/StubGenerator.java index b406e3bf..b0817ab5 100644 --- a/src/main/javassist/tools/rmi/StubGenerator.java +++ b/src/main/javassist/tools/rmi/StubGenerator.java @@ -16,12 +16,22 @@ package javassist.tools.rmi; -import javassist.*; import java.lang.reflect.Method; import java.util.Hashtable; import java.util.Map; +import javassist.CannotCompileException; +import javassist.ClassPool; +import javassist.CtClass; +import javassist.CtConstructor; +import javassist.CtField; +import javassist.CtMethod; import javassist.CtMethod.ConstParameter; +import javassist.CtNewConstructor; +import javassist.CtNewMethod; +import javassist.Modifier; +import javassist.NotFoundException; +import javassist.Translator; /** * A stub-code generator. It is used for producing a proxy class. diff --git a/src/main/javassist/tools/web/Viewer.java b/src/main/javassist/tools/web/Viewer.java index f702cbc7..8fb015f7 100644 --- a/src/main/javassist/tools/web/Viewer.java +++ b/src/main/javassist/tools/web/Viewer.java @@ -16,8 +16,10 @@ package javassist.tools.web; -import java.io.*; -import java.net.*; +import java.io.IOException; +import java.io.InputStream; +import java.net.URL; +import java.net.URLConnection; /** * A sample applet viewer. diff --git a/src/main/javassist/tools/web/Webserver.java b/src/main/javassist/tools/web/Webserver.java index 2252e876..d90e8e34 100644 --- a/src/main/javassist/tools/web/Webserver.java +++ b/src/main/javassist/tools/web/Webserver.java @@ -16,10 +16,23 @@ package javassist.tools.web; -import java.net.*; -import java.io.*; +import java.io.BufferedInputStream; +import java.io.BufferedOutputStream; +import java.io.ByteArrayOutputStream; +import java.io.File; +import java.io.FileInputStream; +import java.io.IOException; +import java.io.InputStream; +import java.io.OutputStream; +import java.net.ServerSocket; +import java.net.Socket; import java.util.Date; -import javassist.*; + +import javassist.CannotCompileException; +import javassist.ClassPool; +import javassist.CtClass; +import javassist.NotFoundException; +import javassist.Translator; /** * A web server for running sample programs. diff --git a/src/main/javassist/util/HotSwapAgent.java b/src/main/javassist/util/HotSwapAgent.java index c3773197..e696ce22 100644 --- a/src/main/javassist/util/HotSwapAgent.java +++ b/src/main/javassist/util/HotSwapAgent.java @@ -21,11 +21,12 @@ import java.io.IOException; import java.lang.instrument.ClassDefinition; import java.lang.instrument.Instrumentation; import java.lang.instrument.UnmodifiableClassException; +import java.lang.management.ManagementFactory; import java.util.jar.Attributes; import java.util.jar.JarEntry; import java.util.jar.JarOutputStream; import java.util.jar.Manifest; -import java.lang.management.ManagementFactory; + import com.sun.tools.attach.VirtualMachine; import javassist.CannotCompileException; diff --git a/src/main/javassist/util/HotSwapper.java b/src/main/javassist/util/HotSwapper.java index a7ab052e..5d64ee5c 100644 --- a/src/main/javassist/util/HotSwapper.java +++ b/src/main/javassist/util/HotSwapper.java @@ -16,12 +16,25 @@ package javassist.util; -import com.sun.jdi.*; -import com.sun.jdi.connect.*; -import com.sun.jdi.event.*; -import com.sun.jdi.request.*; -import java.io.*; -import java.util.*; +import java.io.IOException; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +import com.sun.jdi.Bootstrap; +import com.sun.jdi.ReferenceType; +import com.sun.jdi.VirtualMachine; +import com.sun.jdi.connect.AttachingConnector; +import com.sun.jdi.connect.Connector; +import com.sun.jdi.connect.IllegalConnectorArgumentsException; +import com.sun.jdi.event.Event; +import com.sun.jdi.event.EventIterator; +import com.sun.jdi.event.EventQueue; +import com.sun.jdi.event.EventSet; +import com.sun.jdi.event.MethodEntryEvent; +import com.sun.jdi.request.EventRequest; +import com.sun.jdi.request.EventRequestManager; +import com.sun.jdi.request.MethodEntryRequest; class Trigger { void doSwap() {} diff --git a/src/main/javassist/util/proxy/ProxyFactory.java b/src/main/javassist/util/proxy/ProxyFactory.java index 6ee0c497..072fb42c 100644 --- a/src/main/javassist/util/proxy/ProxyFactory.java +++ b/src/main/javassist/util/proxy/ProxyFactory.java @@ -16,19 +16,39 @@ package javassist.util.proxy; +import java.lang.ref.Reference; +import java.lang.ref.WeakReference; +import java.lang.reflect.Constructor; import java.lang.reflect.Field; import java.lang.reflect.InvocationTargetException; -import java.lang.reflect.Method; -import java.lang.reflect.Constructor; import java.lang.reflect.Member; +import java.lang.reflect.Method; import java.lang.reflect.Modifier; import java.security.ProtectionDomain; -import java.util.*; -import java.lang.ref.Reference; -import java.lang.ref.WeakReference; +import java.util.ArrayList; +import java.util.Collections; +import java.util.Comparator; +import java.util.HashMap; +import java.util.HashSet; +import java.util.Iterator; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.WeakHashMap; import javassist.CannotCompileException; -import javassist.bytecode.*; +import javassist.bytecode.AccessFlag; +import javassist.bytecode.Bytecode; +import javassist.bytecode.ClassFile; +import javassist.bytecode.CodeAttribute; +import javassist.bytecode.ConstPool; +import javassist.bytecode.Descriptor; +import javassist.bytecode.DuplicateMemberException; +import javassist.bytecode.ExceptionsAttribute; +import javassist.bytecode.FieldInfo; +import javassist.bytecode.MethodInfo; +import javassist.bytecode.Opcode; +import javassist.bytecode.StackMapTable; /* * This class is implemented only with the lower-level API of Javassist. diff --git a/src/main/javassist/util/proxy/RuntimeSupport.java b/src/main/javassist/util/proxy/RuntimeSupport.java index ba7a9469..0bd0cce9 100644 --- a/src/main/javassist/util/proxy/RuntimeSupport.java +++ b/src/main/javassist/util/proxy/RuntimeSupport.java @@ -16,8 +16,8 @@ package javassist.util.proxy; -import java.lang.reflect.Method; import java.io.Serializable; +import java.lang.reflect.Method; /** * Runtime support routines that the classes generated by ProxyFactory use. diff --git a/src/main/javassist/util/proxy/SerializedProxy.java b/src/main/javassist/util/proxy/SerializedProxy.java index c7f9c448..1417a04b 100644 --- a/src/main/javassist/util/proxy/SerializedProxy.java +++ b/src/main/javassist/util/proxy/SerializedProxy.java @@ -16,11 +16,11 @@ package javassist.util.proxy; -import java.io.Serializable; -import java.lang.reflect.InvocationTargetException; import java.io.InvalidClassException; import java.io.InvalidObjectException; import java.io.ObjectStreamException; +import java.io.Serializable; +import java.lang.reflect.InvocationTargetException; import java.security.AccessController; import java.security.PrivilegedActionException; import java.security.PrivilegedExceptionAction; -- 2.39.5