summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorchiba <chiba@30ef5769-5b8d-40dd-aea6-55b5d6557bb3>2011-11-11 17:16:34 +0000
committerchiba <chiba@30ef5769-5b8d-40dd-aea6-55b5d6557bb3>2011-11-11 17:16:34 +0000
commit97ab034c5d9dba29f1de495cef9c5a5be8b9ad8f (patch)
treee9c1d44600ee4d8ec0c987dd2321b463d2c3af43 /src
parent444c4bac0f0ccf262375e031f717fed9edea8580 (diff)
downloadjavassist-97ab034c5d9dba29f1de495cef9c5a5be8b9ad8f.tar.gz
javassist-97ab034c5d9dba29f1de495cef9c5a5be8b9ad8f.zip
added javassist.bytecode.analysis.ControlFlow
git-svn-id: http://anonsvn.jboss.org/repos/javassist/trunk@600 30ef5769-5b8d-40dd-aea6-55b5d6557bb3
Diffstat (limited to 'src')
-rw-r--r--src/main/javassist/bytecode/analysis/ControlFlow.java14
-rw-r--r--src/main/javassist/bytecode/analysis/package.html2
2 files changed, 15 insertions, 1 deletions
diff --git a/src/main/javassist/bytecode/analysis/ControlFlow.java b/src/main/javassist/bytecode/analysis/ControlFlow.java
index 424884ba..5b3027aa 100644
--- a/src/main/javassist/bytecode/analysis/ControlFlow.java
+++ b/src/main/javassist/bytecode/analysis/ControlFlow.java
@@ -26,6 +26,20 @@ import javassist.bytecode.stackmap.BasicBlock;
/**
* Represents the control flow graph of a given method.
*
+ * <p>To obtain the control flow graph, do the following:</p>
+ *
+ * <pre>CtMethod m = ...
+ * ControlFlow cf = new ControlFlow(m);
+ * Block[] blocks = cf.basicBlocks();
+ * </pre>
+ *
+ * <p><code>blocks</code> is an array of basic blocks in
+ * that method body.</p>
+ *
+ * @see javassist.CtMethod
+ * @see Block
+ * @see Frame
+ * @see Analyzer
* @author Shigeru Chiba
*/
public class ControlFlow {
diff --git a/src/main/javassist/bytecode/analysis/package.html b/src/main/javassist/bytecode/analysis/package.html
index 0cc1e340..ec39a473 100644
--- a/src/main/javassist/bytecode/analysis/package.html
+++ b/src/main/javassist/bytecode/analysis/package.html
@@ -6,7 +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.
+Look at <code>ControlFlow</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: