From: chiba Date: Tue, 25 Oct 2011 11:30:37 +0000 (+0000) Subject: added some javadoc comments. X-Git-Tag: rel_3_17_1_ga~65 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=bfc16920e4eb12db5df1e6175e77e3b3c81e37b2;p=javassist.git added some javadoc comments. git-svn-id: http://anonsvn.jboss.org/repos/javassist/trunk@594 30ef5769-5b8d-40dd-aea6-55b5d6557bb3 --- diff --git a/src/main/javassist/ClassMap.java b/src/main/javassist/ClassMap.java index 57971c76..f4e6a31d 100644 --- a/src/main/javassist/ClassMap.java +++ b/src/main/javassist/ClassMap.java @@ -41,6 +41,8 @@ import javassist.bytecode.Descriptor; * For example, the internal representation of java.lang.String * is java/lang/String. * + *

Note that this is a map from String to String. + * * @see #get(Object) * @see CtClass#replaceClassName(ClassMap) * @see CtNewMethod#copy(CtMethod,String,CtClass,ClassMap) diff --git a/src/main/javassist/bytecode/InstructionPrinter.java b/src/main/javassist/bytecode/InstructionPrinter.java index c3c4b169..c02767d9 100644 --- a/src/main/javassist/bytecode/InstructionPrinter.java +++ b/src/main/javassist/bytecode/InstructionPrinter.java @@ -20,7 +20,7 @@ import java.io.PrintStream; import javassist.CtMethod; /** - * Simple utility class for printing the instructions of a method. + * Simple utility class for printing the bytecode instructions of a method. * * @author Jason T. Greene */ @@ -29,14 +29,23 @@ public class InstructionPrinter implements Opcode { private final static String opcodes[] = Mnemonic.OPCODE; private final PrintStream stream; + /** + * Constructs a InstructionPrinter object. + */ public InstructionPrinter(PrintStream stream) { this.stream = stream; } + /** + * Prints the bytecode instructions of a given method. + */ public static void print(CtMethod method, PrintStream stream) { (new InstructionPrinter(stream)).print(method); } + /** + * Prints the bytecode instructions of a given method. + */ public void print(CtMethod method) { MethodInfo info = method.getMethodInfo2(); ConstPool pool = info.getConstPool(); @@ -57,6 +66,10 @@ public class InstructionPrinter implements Opcode { } } + /** + * Gets a string representation of the bytecode instruction at the specified + * position. + */ public static String instructionString(CodeIterator iter, int pos, ConstPool pool) { int opcode = iter.byteAt(pos); diff --git a/src/main/javassist/bytecode/analysis/package.html b/src/main/javassist/bytecode/analysis/package.html index b141670b..0cc1e340 100644 --- a/src/main/javassist/bytecode/analysis/package.html +++ b/src/main/javassist/bytecode/analysis/package.html @@ -6,6 +6,7 @@ Bytecode Analysis API. This allows the user to determine the type state of the stack and local variable table at the start of every instruction. In addition this API can be used to validate bytecode, find dead bytecode, and identify unnecessary checkcasts. +Look at Analyzer class first for details.

The users of this package must know the specifications of class file and Java bytecode. For more details, read this book: