aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/main/javassist/ClassMap.java2
-rw-r--r--src/main/javassist/bytecode/InstructionPrinter.java15
-rw-r--r--src/main/javassist/bytecode/analysis/package.html1
3 files changed, 17 insertions, 1 deletions
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 <code>java.lang.String</code>
* is <code>java/lang/String</code>.
*
+ * <p>Note that this is a map from <code>String</code> to <code>String</code>.
+ *
* @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 <code>InstructionPrinter</code> 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 <code>Analyzer</code> class first for details.
<p>The users of this package must know the specifications of
class file and Java bytecode. For more details, read this book: