[jboss-cvs] javassist SVN: r594 - in trunk/src/main/javassist: bytecode and 1 other directories.
jboss-cvs-commits at lists.jboss.org
jboss-cvs-commits at lists.jboss.org
Tue Oct 25 07:30:37 EDT 2011
Author: chiba
Date: 2011-10-25 07:30:37 -0400 (Tue, 25 Oct 2011)
New Revision: 594
Modified:
trunk/src/main/javassist/ClassMap.java
trunk/src/main/javassist/bytecode/InstructionPrinter.java
trunk/src/main/javassist/bytecode/analysis/package.html
Log:
added some javadoc comments.
Modified: trunk/src/main/javassist/ClassMap.java
===================================================================
--- trunk/src/main/javassist/ClassMap.java 2011-10-19 04:54:56 UTC (rev 593)
+++ trunk/src/main/javassist/ClassMap.java 2011-10-25 11:30:37 UTC (rev 594)
@@ -41,6 +41,8 @@
* 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)
Modified: trunk/src/main/javassist/bytecode/InstructionPrinter.java
===================================================================
--- trunk/src/main/javassist/bytecode/InstructionPrinter.java 2011-10-19 04:54:56 UTC (rev 593)
+++ trunk/src/main/javassist/bytecode/InstructionPrinter.java 2011-10-25 11:30:37 UTC (rev 594)
@@ -20,7 +20,7 @@
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 @@
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 @@
}
}
+ /**
+ * 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);
Modified: trunk/src/main/javassist/bytecode/analysis/package.html
===================================================================
--- trunk/src/main/javassist/bytecode/analysis/package.html 2011-10-19 04:54:56 UTC (rev 593)
+++ trunk/src/main/javassist/bytecode/analysis/package.html 2011-10-25 11:30:37 UTC (rev 594)
@@ -6,6 +6,7 @@
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:
More information about the jboss-cvs-commits
mailing list