You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

Analyzer.html 31KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434
  1. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
  2. <!-- NewPage -->
  3. <html lang="en">
  4. <head>
  5. <!-- Generated by javadoc (10.0.1) on Thu Jun 21 01:52:55 JST 2018 -->
  6. <title>Analyzer (Javassist API)</title>
  7. <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
  8. <meta name="date" content="2018-06-21">
  9. <link rel="stylesheet" type="text/css" href="../../../stylesheet.css" title="Style">
  10. <link rel="stylesheet" type="text/css" href="../../../jquery/jquery-ui.css" title="Style">
  11. <script type="text/javascript" src="../../../script.js"></script>
  12. <script type="text/javascript" src="../../../jquery/jszip/dist/jszip.min.js"></script>
  13. <script type="text/javascript" src="../../../jquery/jszip-utils/dist/jszip-utils.min.js"></script>
  14. <!--[if IE]>
  15. <script type="text/javascript" src="../../../jquery/jszip-utils/dist/jszip-utils-ie.min.js"></script>
  16. <![endif]-->
  17. <script type="text/javascript" src="../../../jquery/jquery-1.10.2.js"></script>
  18. <script type="text/javascript" src="../../../jquery/jquery-ui.js"></script>
  19. </head>
  20. <body>
  21. <script type="text/javascript"><!--
  22. try {
  23. if (location.href.indexOf('is-external=true') == -1) {
  24. parent.document.title="Analyzer (Javassist API)";
  25. }
  26. }
  27. catch(err) {
  28. }
  29. //-->
  30. var methods = {"i0":10,"i1":10};
  31. var tabs = {65535:["t0","All Methods"],2:["t2","Instance Methods"],8:["t4","Concrete Methods"]};
  32. var altColor = "altColor";
  33. var rowColor = "rowColor";
  34. var tableTab = "tableTab";
  35. var activeTableTab = "activeTableTab";
  36. var pathtoroot = "../../../";loadScripts(document, 'script');</script>
  37. <noscript>
  38. <div>JavaScript is disabled on your browser.</div>
  39. </noscript>
  40. <div class="fixedNav">
  41. <!-- ========= START OF TOP NAVBAR ======= -->
  42. <div class="topNav"><a name="navbar.top">
  43. <!-- -->
  44. </a>
  45. <div class="skipNav"><a href="#skip.navbar.top" title="Skip navigation links">Skip navigation links</a></div>
  46. <a name="navbar.top.firstrow">
  47. <!-- -->
  48. </a>
  49. <ul class="navList" title="Navigation">
  50. <li><a href="../../../overview-summary.html">Overview</a></li>
  51. <li><a href="package-summary.html">Package</a></li>
  52. <li class="navBarCell1Rev">Class</li>
  53. <li><a href="class-use/Analyzer.html">Use</a></li>
  54. <li><a href="package-tree.html">Tree</a></li>
  55. <li><a href="../../../deprecated-list.html">Deprecated</a></li>
  56. <li><a href="../../../index-all.html">Index</a></li>
  57. </ul>
  58. </div>
  59. <div class="subNav">
  60. <ul class="navList">
  61. <li>Prev&nbsp;Class</li>
  62. <li><a href="../../../javassist/bytecode/analysis/ControlFlow.html" title="class in javassist.bytecode.analysis"><span class="typeNameLink">Next&nbsp;Class</span></a></li>
  63. </ul>
  64. <ul class="navList">
  65. <li><a href="../../../index.html?javassist/bytecode/analysis/Analyzer.html" target="_top">Frames</a></li>
  66. <li><a href="Analyzer.html" target="_top">No&nbsp;Frames</a></li>
  67. </ul>
  68. <ul class="navList" id="allclasses_navbar_top">
  69. <li><a href="../../../allclasses-noframe.html">All&nbsp;Classes</a></li>
  70. </ul>
  71. <ul class="navListSearch">
  72. <li><label for="search">SEARCH:</label>
  73. <input type="text" id="search" value="search" disabled="disabled">
  74. <input type="reset" id="reset" value="reset" disabled="disabled">
  75. </li>
  76. </ul>
  77. <div>
  78. <script type="text/javascript"><!--
  79. allClassesLink = document.getElementById("allclasses_navbar_top");
  80. if(window==top) {
  81. allClassesLink.style.display = "block";
  82. }
  83. else {
  84. allClassesLink.style.display = "none";
  85. }
  86. //-->
  87. </script>
  88. <noscript>
  89. <div>JavaScript is disabled on your browser.</div>
  90. </noscript>
  91. </div>
  92. <div>
  93. <ul class="subNavList">
  94. <li>Summary:&nbsp;</li>
  95. <li>Nested&nbsp;|&nbsp;</li>
  96. <li>Field&nbsp;|&nbsp;</li>
  97. <li><a href="#constructor.summary">Constr</a>&nbsp;|&nbsp;</li>
  98. <li><a href="#method.summary">Method</a></li>
  99. </ul>
  100. <ul class="subNavList">
  101. <li>Detail:&nbsp;</li>
  102. <li>Field&nbsp;|&nbsp;</li>
  103. <li><a href="#constructor.detail">Constr</a>&nbsp;|&nbsp;</li>
  104. <li><a href="#method.detail">Method</a></li>
  105. </ul>
  106. </div>
  107. <a name="skip.navbar.top">
  108. <!-- -->
  109. </a></div>
  110. <!-- ========= END OF TOP NAVBAR ========= -->
  111. </div>
  112. <div class="navPadding">&nbsp;</div>
  113. <script type="text/javascript"><!--
  114. $('.navPadding').css('padding-top', $('.fixedNav').css("height"));
  115. //-->
  116. </script>
  117. <!-- ======== START OF CLASS DATA ======== -->
  118. <div class="header">
  119. <div class="subTitle"><span class="packageLabelInType">Package</span>&nbsp;<a href="../../../javassist/bytecode/analysis/package-summary.html">javassist.bytecode.analysis</a></div>
  120. <h2 title="Class Analyzer" class="title">Class Analyzer</h2>
  121. </div>
  122. <div class="contentContainer">
  123. <ul class="inheritance">
  124. <li>java.lang.Object</li>
  125. <li>
  126. <ul class="inheritance">
  127. <li>javassist.bytecode.analysis.Analyzer</li>
  128. </ul>
  129. </li>
  130. </ul>
  131. <div class="description">
  132. <ul class="blockList">
  133. <li class="blockList">
  134. <dl>
  135. <dt>All Implemented Interfaces:</dt>
  136. <dd><code><a href="../../../javassist/bytecode/Opcode.html" title="interface in javassist.bytecode">Opcode</a></code></dd>
  137. </dl>
  138. <hr>
  139. <pre>public class <span class="typeNameLabel">Analyzer</span>
  140. extends java.lang.Object
  141. implements <a href="../../../javassist/bytecode/Opcode.html" title="interface in javassist.bytecode">Opcode</a></pre>
  142. <div class="block">A data-flow analyzer that determines the type state of the stack and local
  143. variable table at every reachable instruction in a method. During analysis,
  144. bytecode verification is performed in a similar manner to that described
  145. in the JVM specification.
  146. <p>Example:</p>
  147. <pre>
  148. // Method to analyze
  149. public Object doSomething(int x) {
  150. Number n;
  151. if (x &lt; 5) {
  152. n = new Double(0);
  153. } else {
  154. n = new Long(0);
  155. }
  156. return n;
  157. }
  158. // Which compiles to:
  159. // 0: iload_1
  160. // 1: iconst_5
  161. // 2: if_icmpge 17
  162. // 5: new #18; //class java/lang/Double
  163. // 8: dup
  164. // 9: dconst_0
  165. // 10: invokespecial #44; //Method java/lang/Double."&lt;init&gt;":(D)V
  166. // 13: astore_2
  167. // 14: goto 26
  168. // 17: new #16; //class java/lang/Long
  169. // 20: dup
  170. // 21: lconst_1
  171. // 22: invokespecial #47; //Method java/lang/Long."&lt;init&gt;":(J)V
  172. // 25: astore_2
  173. // 26: aload_2
  174. // 27: areturn
  175. public void analyzeIt(CtClass clazz, MethodInfo method) {
  176. Analyzer analyzer = new Analyzer();
  177. Frame[] frames = analyzer.analyze(clazz, method);
  178. frames[0].getLocal(0).getCtClass(); // returns clazz;
  179. frames[0].getLocal(1).getCtClass(); // returns java.lang.String
  180. frames[1].peek(); // returns Type.INTEGER
  181. frames[27].peek().getCtClass(); // returns java.lang.Number
  182. }
  183. </pre></div>
  184. <dl>
  185. <dt><span class="simpleTagLabel">Author:</span></dt>
  186. <dd>Jason T. Greene</dd>
  187. <dt><span class="seeLabel">See Also:</span></dt>
  188. <dd><a href="../../../javassist/bytecode/analysis/FramePrinter.html" title="class in javassist.bytecode.analysis"><code>FramePrinter</code></a></dd>
  189. </dl>
  190. </li>
  191. </ul>
  192. </div>
  193. <div class="summary">
  194. <ul class="blockList">
  195. <li class="blockList">
  196. <!-- =========== FIELD SUMMARY =========== -->
  197. <ul class="blockList">
  198. <li class="blockList"><a name="field.summary">
  199. <!-- -->
  200. </a>
  201. <h3>Field Summary</h3>
  202. <ul class="blockList">
  203. <li class="blockList"><a name="fields.inherited.from.class.javassist.bytecode.Opcode">
  204. <!-- -->
  205. </a>
  206. <h3>Fields inherited from interface&nbsp;javassist.bytecode.<a href="../../../javassist/bytecode/Opcode.html" title="interface in javassist.bytecode">Opcode</a></h3>
  207. <code><a href="../../../javassist/bytecode/Opcode.html#AALOAD">AALOAD</a>, <a href="../../../javassist/bytecode/Opcode.html#AASTORE">AASTORE</a>, <a href="../../../javassist/bytecode/Opcode.html#ACONST_NULL">ACONST_NULL</a>, <a href="../../../javassist/bytecode/Opcode.html#ALOAD">ALOAD</a>, <a href="../../../javassist/bytecode/Opcode.html#ALOAD_0">ALOAD_0</a>, <a href="../../../javassist/bytecode/Opcode.html#ALOAD_1">ALOAD_1</a>, <a href="../../../javassist/bytecode/Opcode.html#ALOAD_2">ALOAD_2</a>, <a href="../../../javassist/bytecode/Opcode.html#ALOAD_3">ALOAD_3</a>, <a href="../../../javassist/bytecode/Opcode.html#ANEWARRAY">ANEWARRAY</a>, <a href="../../../javassist/bytecode/Opcode.html#ARETURN">ARETURN</a>, <a href="../../../javassist/bytecode/Opcode.html#ARRAYLENGTH">ARRAYLENGTH</a>, <a href="../../../javassist/bytecode/Opcode.html#ASTORE">ASTORE</a>, <a href="../../../javassist/bytecode/Opcode.html#ASTORE_0">ASTORE_0</a>, <a href="../../../javassist/bytecode/Opcode.html#ASTORE_1">ASTORE_1</a>, <a href="../../../javassist/bytecode/Opcode.html#ASTORE_2">ASTORE_2</a>, <a href="../../../javassist/bytecode/Opcode.html#ASTORE_3">ASTORE_3</a>, <a href="../../../javassist/bytecode/Opcode.html#ATHROW">ATHROW</a>, <a href="../../../javassist/bytecode/Opcode.html#BALOAD">BALOAD</a>, <a href="../../../javassist/bytecode/Opcode.html#BASTORE">BASTORE</a>, <a href="../../../javassist/bytecode/Opcode.html#BIPUSH">BIPUSH</a>, <a href="../../../javassist/bytecode/Opcode.html#CALOAD">CALOAD</a>, <a href="../../../javassist/bytecode/Opcode.html#CASTORE">CASTORE</a>, <a href="../../../javassist/bytecode/Opcode.html#CHECKCAST">CHECKCAST</a>, <a href="../../../javassist/bytecode/Opcode.html#D2F">D2F</a>, <a href="../../../javassist/bytecode/Opcode.html#D2I">D2I</a>, <a href="../../../javassist/bytecode/Opcode.html#D2L">D2L</a>, <a href="../../../javassist/bytecode/Opcode.html#DADD">DADD</a>, <a href="../../../javassist/bytecode/Opcode.html#DALOAD">DALOAD</a>, <a href="../../../javassist/bytecode/Opcode.html#DASTORE">DASTORE</a>, <a href="../../../javassist/bytecode/Opcode.html#DCMPG">DCMPG</a>, <a href="../../../javassist/bytecode/Opcode.html#DCMPL">DCMPL</a>, <a href="../../../javassist/bytecode/Opcode.html#DCONST_0">DCONST_0</a>, <a href="../../../javassist/bytecode/Opcode.html#DCONST_1">DCONST_1</a>, <a href="../../../javassist/bytecode/Opcode.html#DDIV">DDIV</a>, <a href="../../../javassist/bytecode/Opcode.html#DLOAD">DLOAD</a>, <a href="../../../javassist/bytecode/Opcode.html#DLOAD_0">DLOAD_0</a>, <a href="../../../javassist/bytecode/Opcode.html#DLOAD_1">DLOAD_1</a>, <a href="../../../javassist/bytecode/Opcode.html#DLOAD_2">DLOAD_2</a>, <a href="../../../javassist/bytecode/Opcode.html#DLOAD_3">DLOAD_3</a>, <a href="../../../javassist/bytecode/Opcode.html#DMUL">DMUL</a>, <a href="../../../javassist/bytecode/Opcode.html#DNEG">DNEG</a>, <a href="../../../javassist/bytecode/Opcode.html#DREM">DREM</a>, <a href="../../../javassist/bytecode/Opcode.html#DRETURN">DRETURN</a>, <a href="../../../javassist/bytecode/Opcode.html#DSTORE">DSTORE</a>, <a href="../../../javassist/bytecode/Opcode.html#DSTORE_0">DSTORE_0</a>, <a href="../../../javassist/bytecode/Opcode.html#DSTORE_1">DSTORE_1</a>, <a href="../../../javassist/bytecode/Opcode.html#DSTORE_2">DSTORE_2</a>, <a href="../../../javassist/bytecode/Opcode.html#DSTORE_3">DSTORE_3</a>, <a href="../../../javassist/bytecode/Opcode.html#DSUB">DSUB</a>, <a href="../../../javassist/bytecode/Opcode.html#DUP">DUP</a>, <a href="../../../javassist/bytecode/Opcode.html#DUP_X1">DUP_X1</a>, <a href="../../../javassist/bytecode/Opcode.html#DUP_X2">DUP_X2</a>, <a href="../../../javassist/bytecode/Opcode.html#DUP2">DUP2</a>, <a href="../../../javassist/bytecode/Opcode.html#DUP2_X1">DUP2_X1</a>, <a href="../../../javassist/bytecode/Opcode.html#DUP2_X2">DUP2_X2</a>, <a href="../../../javassist/bytecode/Opcode.html#F2D">F2D</a>, <a href="../../../javassist/bytecode/Opcode.html#F2I">F2I</a>, <a href="../../../javassist/bytecode/Opcode.html#F2L">F2L</a>, <a href="../../../javassist/bytecode/Opcode.html#FADD">FADD</a>, <a href="../../../javassist/bytecode/Opcode.html#FALOAD">FALOAD</a>, <a href="../../../javassist/bytecode/Opcode.html#FASTORE">FASTORE</a>, <a href="../../../javassist/bytecode/Opcode.html#FCMPG">FCMPG</a>, <a href="../../../javassist/bytecode/Opcode.html#FCMPL">FCMPL</a>, <a href="../../../javassist/bytecode/Opcode.html#FCONST_0">FCONST_0</a>, <a href="../../../javassist/bytecode/Opcode.html#FCONST_1">FCONST_1</a>, <a href="../../../javassist/bytecode/Opcode.html#FCONST_2">FCONST_2</a>, <a href="../../../javassist/bytecode/Opcode.html#FDIV">FDIV</a>, <a href="../../../javassist/bytecode/Opcode.html#FLOAD">FLOAD</a>, <a href="../../../javassist/bytecode/Opcode.html#FLOAD_0">FLOAD_0</a>, <a href="../../../javassist/bytecode/Opcode.html#FLOAD_1">FLOAD_1</a>, <a href="../../../javassist/bytecode/Opcode.html#FLOAD_2">FLOAD_2</a>, <a href="../../../javassist/bytecode/Opcode.html#FLOAD_3">FLOAD_3</a>, <a href="../../../javassist/bytecode/Opcode.html#FMUL">FMUL</a>, <a href="../../../javassist/bytecode/Opcode.html#FNEG">FNEG</a>, <a href="../../../javassist/bytecode/Opcode.html#FREM">FREM</a>, <a href="../../../javassist/bytecode/Opcode.html#FRETURN">FRETURN</a>, <a href="../../../javassist/bytecode/Opcode.html#FSTORE">FSTORE</a>, <a href="../../../javassist/bytecode/Opcode.html#FSTORE_0">FSTORE_0</a>, <a href="../../../javassist/bytecode/Opcode.html#FSTORE_1">FSTORE_1</a>, <a href="../../../javassist/bytecode/Opcode.html#FSTORE_2">FSTORE_2</a>, <a href="../../../javassist/bytecode/Opcode.html#FSTORE_3">FSTORE_3</a>, <a href="../../../javassist/bytecode/Opcode.html#FSUB">FSUB</a>, <a href="../../../javassist/bytecode/Opcode.html#GETFIELD">GETFIELD</a>, <a href="../../../javassist/bytecode/Opcode.html#GETSTATIC">GETSTATIC</a>, <a href="../../../javassist/bytecode/Opcode.html#GOTO">GOTO</a>, <a href="../../../javassist/bytecode/Opcode.html#GOTO_W">GOTO_W</a>, <a href="../../../javassist/bytecode/Opcode.html#I2B">I2B</a>, <a href="../../../javassist/bytecode/Opcode.html#I2C">I2C</a>, <a href="../../../javassist/bytecode/Opcode.html#I2D">I2D</a>, <a href="../../../javassist/bytecode/Opcode.html#I2F">I2F</a>, <a href="../../../javassist/bytecode/Opcode.html#I2L">I2L</a>, <a href="../../../javassist/bytecode/Opcode.html#I2S">I2S</a>, <a href="../../../javassist/bytecode/Opcode.html#IADD">IADD</a>, <a href="../../../javassist/bytecode/Opcode.html#IALOAD">IALOAD</a>, <a href="../../../javassist/bytecode/Opcode.html#IAND">IAND</a>, <a href="../../../javassist/bytecode/Opcode.html#IASTORE">IASTORE</a>, <a href="../../../javassist/bytecode/Opcode.html#ICONST_0">ICONST_0</a>, <a href="../../../javassist/bytecode/Opcode.html#ICONST_1">ICONST_1</a>, <a href="../../../javassist/bytecode/Opcode.html#ICONST_2">ICONST_2</a>, <a href="../../../javassist/bytecode/Opcode.html#ICONST_3">ICONST_3</a>, <a href="../../../javassist/bytecode/Opcode.html#ICONST_4">ICONST_4</a>, <a href="../../../javassist/bytecode/Opcode.html#ICONST_5">ICONST_5</a>, <a href="../../../javassist/bytecode/Opcode.html#ICONST_M1">ICONST_M1</a>, <a href="../../../javassist/bytecode/Opcode.html#IDIV">IDIV</a>, <a href="../../../javassist/bytecode/Opcode.html#IF_ACMPEQ">IF_ACMPEQ</a>, <a href="../../../javassist/bytecode/Opcode.html#IF_ACMPNE">IF_ACMPNE</a>, <a href="../../../javassist/bytecode/Opcode.html#IF_ICMPEQ">IF_ICMPEQ</a>, <a href="../../../javassist/bytecode/Opcode.html#IF_ICMPGE">IF_ICMPGE</a>, <a href="../../../javassist/bytecode/Opcode.html#IF_ICMPGT">IF_ICMPGT</a>, <a href="../../../javassist/bytecode/Opcode.html#IF_ICMPLE">IF_ICMPLE</a>, <a href="../../../javassist/bytecode/Opcode.html#IF_ICMPLT">IF_ICMPLT</a>, <a href="../../../javassist/bytecode/Opcode.html#IF_ICMPNE">IF_ICMPNE</a>, <a href="../../../javassist/bytecode/Opcode.html#IFEQ">IFEQ</a>, <a href="../../../javassist/bytecode/Opcode.html#IFGE">IFGE</a>, <a href="../../../javassist/bytecode/Opcode.html#IFGT">IFGT</a>, <a href="../../../javassist/bytecode/Opcode.html#IFLE">IFLE</a>, <a href="../../../javassist/bytecode/Opcode.html#IFLT">IFLT</a>, <a href="../../../javassist/bytecode/Opcode.html#IFNE">IFNE</a>, <a href="../../../javassist/bytecode/Opcode.html#IFNONNULL">IFNONNULL</a>, <a href="../../../javassist/bytecode/Opcode.html#IFNULL">IFNULL</a>, <a href="../../../javassist/bytecode/Opcode.html#IINC">IINC</a>, <a href="../../../javassist/bytecode/Opcode.html#ILOAD">ILOAD</a>, <a href="../../../javassist/bytecode/Opcode.html#ILOAD_0">ILOAD_0</a>, <a href="../../../javassist/bytecode/Opcode.html#ILOAD_1">ILOAD_1</a>, <a href="../../../javassist/bytecode/Opcode.html#ILOAD_2">ILOAD_2</a>, <a href="../../../javassist/bytecode/Opcode.html#ILOAD_3">ILOAD_3</a>, <a href="../../../javassist/bytecode/Opcode.html#IMUL">IMUL</a>, <a href="../../../javassist/bytecode/Opcode.html#INEG">INEG</a>, <a href="../../../javassist/bytecode/Opcode.html#INSTANCEOF">INSTANCEOF</a>, <a href="../../../javassist/bytecode/Opcode.html#INVOKEDYNAMIC">INVOKEDYNAMIC</a>, <a href="../../../javassist/bytecode/Opcode.html#INVOKEINTERFACE">INVOKEINTERFACE</a>, <a href="../../../javassist/bytecode/Opcode.html#INVOKESPECIAL">INVOKESPECIAL</a>, <a href="../../../javassist/bytecode/Opcode.html#INVOKESTATIC">INVOKESTATIC</a>, <a href="../../../javassist/bytecode/Opcode.html#INVOKEVIRTUAL">INVOKEVIRTUAL</a>, <a href="../../../javassist/bytecode/Opcode.html#IOR">IOR</a>, <a href="../../../javassist/bytecode/Opcode.html#IREM">IREM</a>, <a href="../../../javassist/bytecode/Opcode.html#IRETURN">IRETURN</a>, <a href="../../../javassist/bytecode/Opcode.html#ISHL">ISHL</a>, <a href="../../../javassist/bytecode/Opcode.html#ISHR">ISHR</a>, <a href="../../../javassist/bytecode/Opcode.html#ISTORE">ISTORE</a>, <a href="../../../javassist/bytecode/Opcode.html#ISTORE_0">ISTORE_0</a>, <a href="../../../javassist/bytecode/Opcode.html#ISTORE_1">ISTORE_1</a>, <a href="../../../javassist/bytecode/Opcode.html#ISTORE_2">ISTORE_2</a>, <a href="../../../javassist/bytecode/Opcode.html#ISTORE_3">ISTORE_3</a>, <a href="../../../javassist/bytecode/Opcode.html#ISUB">ISUB</a>, <a href="../../../javassist/bytecode/Opcode.html#IUSHR">IUSHR</a>, <a href="../../../javassist/bytecode/Opcode.html#IXOR">IXOR</a>, <a href="../../../javassist/bytecode/Opcode.html#JSR">JSR</a>, <a href="../../../javassist/bytecode/Opcode.html#JSR_W">JSR_W</a>, <a href="../../../javassist/bytecode/Opcode.html#L2D">L2D</a>, <a href="../../../javassist/bytecode/Opcode.html#L2F">L2F</a>, <a href="../../../javassist/bytecode/Opcode.html#L2I">L2I</a>, <a href="../../../javassist/bytecode/Opcode.html#LADD">LADD</a>, <a href="../../../javassist/bytecode/Opcode.html#LALOAD">LALOAD</a>, <a href="../../../javassist/bytecode/Opcode.html#LAND">LAND</a>, <a href="../../../javassist/bytecode/Opcode.html#LASTORE">LASTORE</a>, <a href="../../../javassist/bytecode/Opcode.html#LCMP">LCMP</a>, <a href="../../../javassist/bytecode/Opcode.html#LCONST_0">LCONST_0</a>, <a href="../../../javassist/bytecode/Opcode.html#LCONST_1">LCONST_1</a>, <a href="../../../javassist/bytecode/Opcode.html#LDC">LDC</a>, <a href="../../../javassist/bytecode/Opcode.html#LDC_W">LDC_W</a>, <a href="../../../javassist/bytecode/Opcode.html#LDC2_W">LDC2_W</a>, <a href="../../../javassist/bytecode/Opcode.html#LDIV">LDIV</a>, <a href="../../../javassist/bytecode/Opcode.html#LLOAD">LLOAD</a>, <a href="../../../javassist/bytecode/Opcode.html#LLOAD_0">LLOAD_0</a>, <a href="../../../javassist/bytecode/Opcode.html#LLOAD_1">LLOAD_1</a>, <a href="../../../javassist/bytecode/Opcode.html#LLOAD_2">LLOAD_2</a>, <a href="../../../javassist/bytecode/Opcode.html#LLOAD_3">LLOAD_3</a>, <a href="../../../javassist/bytecode/Opcode.html#LMUL">LMUL</a>, <a href="../../../javassist/bytecode/Opcode.html#LNEG">LNEG</a>, <a href="../../../javassist/bytecode/Opcode.html#LOOKUPSWITCH">LOOKUPSWITCH</a>, <a href="../../../javassist/bytecode/Opcode.html#LOR">LOR</a>, <a href="../../../javassist/bytecode/Opcode.html#LREM">LREM</a>, <a href="../../../javassist/bytecode/Opcode.html#LRETURN">LRETURN</a>, <a href="../../../javassist/bytecode/Opcode.html#LSHL">LSHL</a>, <a href="../../../javassist/bytecode/Opcode.html#LSHR">LSHR</a>, <a href="../../../javassist/bytecode/Opcode.html#LSTORE">LSTORE</a>, <a href="../../../javassist/bytecode/Opcode.html#LSTORE_0">LSTORE_0</a>, <a href="../../../javassist/bytecode/Opcode.html#LSTORE_1">LSTORE_1</a>, <a href="../../../javassist/bytecode/Opcode.html#LSTORE_2">LSTORE_2</a>, <a href="../../../javassist/bytecode/Opcode.html#LSTORE_3">LSTORE_3</a>, <a href="../../../javassist/bytecode/Opcode.html#LSUB">LSUB</a>, <a href="../../../javassist/bytecode/Opcode.html#LUSHR">LUSHR</a>, <a href="../../../javassist/bytecode/Opcode.html#LXOR">LXOR</a>, <a href="../../../javassist/bytecode/Opcode.html#MONITORENTER">MONITORENTER</a>, <a href="../../../javassist/bytecode/Opcode.html#MONITOREXIT">MONITOREXIT</a>, <a href="../../../javassist/bytecode/Opcode.html#MULTIANEWARRAY">MULTIANEWARRAY</a>, <a href="../../../javassist/bytecode/Opcode.html#NEW">NEW</a>, <a href="../../../javassist/bytecode/Opcode.html#NEWARRAY">NEWARRAY</a>, <a href="../../../javassist/bytecode/Opcode.html#NOP">NOP</a>, <a href="../../../javassist/bytecode/Opcode.html#POP">POP</a>, <a href="../../../javassist/bytecode/Opcode.html#POP2">POP2</a>, <a href="../../../javassist/bytecode/Opcode.html#PUTFIELD">PUTFIELD</a>, <a href="../../../javassist/bytecode/Opcode.html#PUTSTATIC">PUTSTATIC</a>, <a href="../../../javassist/bytecode/Opcode.html#RET">RET</a>, <a href="../../../javassist/bytecode/Opcode.html#RETURN">RETURN</a>, <a href="../../../javassist/bytecode/Opcode.html#SALOAD">SALOAD</a>, <a href="../../../javassist/bytecode/Opcode.html#SASTORE">SASTORE</a>, <a href="../../../javassist/bytecode/Opcode.html#SIPUSH">SIPUSH</a>, <a href="../../../javassist/bytecode/Opcode.html#STACK_GROW">STACK_GROW</a>, <a href="../../../javassist/bytecode/Opcode.html#SWAP">SWAP</a>, <a href="../../../javassist/bytecode/Opcode.html#T_BOOLEAN">T_BOOLEAN</a>, <a href="../../../javassist/bytecode/Opcode.html#T_BYTE">T_BYTE</a>, <a href="../../../javassist/bytecode/Opcode.html#T_CHAR">T_CHAR</a>, <a href="../../../javassist/bytecode/Opcode.html#T_DOUBLE">T_DOUBLE</a>, <a href="../../../javassist/bytecode/Opcode.html#T_FLOAT">T_FLOAT</a>, <a href="../../../javassist/bytecode/Opcode.html#T_INT">T_INT</a>, <a href="../../../javassist/bytecode/Opcode.html#T_LONG">T_LONG</a>, <a href="../../../javassist/bytecode/Opcode.html#T_SHORT">T_SHORT</a>, <a href="../../../javassist/bytecode/Opcode.html#TABLESWITCH">TABLESWITCH</a>, <a href="../../../javassist/bytecode/Opcode.html#WIDE">WIDE</a></code></li>
  208. </ul>
  209. </li>
  210. </ul>
  211. <!-- ======== CONSTRUCTOR SUMMARY ======== -->
  212. <ul class="blockList">
  213. <li class="blockList"><a name="constructor.summary">
  214. <!-- -->
  215. </a>
  216. <h3>Constructor Summary</h3>
  217. <table class="memberSummary" summary="Constructor Summary table, listing constructors, and an explanation">
  218. <caption><span>Constructors</span><span class="tabEnd">&nbsp;</span></caption>
  219. <tr>
  220. <th class="colFirst" scope="col">Constructor</th>
  221. <th class="colLast" scope="col">Description</th>
  222. </tr>
  223. <tr class="altColor">
  224. <th class="colConstructorName" scope="row"><code><span class="memberNameLink"><a href="../../../javassist/bytecode/analysis/Analyzer.html#Analyzer--">Analyzer</a></span>()</code></th>
  225. <td class="colLast">&nbsp;</td>
  226. </tr>
  227. </table>
  228. </li>
  229. </ul>
  230. <!-- ========== METHOD SUMMARY =========== -->
  231. <ul class="blockList">
  232. <li class="blockList"><a name="method.summary">
  233. <!-- -->
  234. </a>
  235. <h3>Method Summary</h3>
  236. <table class="memberSummary" summary="Method Summary table, listing methods, and an explanation">
  237. <caption><span id="t0" class="activeTableTab"><span>All Methods</span><span class="tabEnd">&nbsp;</span></span><span id="t2" class="tableTab"><span><a href="javascript:show(2);">Instance Methods</a></span><span class="tabEnd">&nbsp;</span></span><span id="t4" class="tableTab"><span><a href="javascript:show(8);">Concrete Methods</a></span><span class="tabEnd">&nbsp;</span></span></caption>
  238. <tr>
  239. <th class="colFirst" scope="col">Modifier and Type</th>
  240. <th class="colSecond" scope="col">Method</th>
  241. <th class="colLast" scope="col">Description</th>
  242. </tr>
  243. <tr id="i0" class="altColor">
  244. <td class="colFirst"><code><a href="../../../javassist/bytecode/analysis/Frame.html" title="class in javassist.bytecode.analysis">Frame</a>[]</code></td>
  245. <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="../../../javassist/bytecode/analysis/Analyzer.html#analyze-javassist.CtClass-javassist.bytecode.MethodInfo-">analyze</a></span>&#8203;(<a href="../../../javassist/CtClass.html" title="class in javassist">CtClass</a>&nbsp;clazz,
  246. <a href="../../../javassist/bytecode/MethodInfo.html" title="class in javassist.bytecode">MethodInfo</a>&nbsp;method)</code></th>
  247. <td class="colLast">
  248. <div class="block">Performs data-flow analysis on a method and returns an array, indexed by
  249. instruction position, containing the starting frame state of all reachable
  250. instructions.</div>
  251. </td>
  252. </tr>
  253. <tr id="i1" class="rowColor">
  254. <td class="colFirst"><code><a href="../../../javassist/bytecode/analysis/Frame.html" title="class in javassist.bytecode.analysis">Frame</a>[]</code></td>
  255. <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="../../../javassist/bytecode/analysis/Analyzer.html#analyze-javassist.CtMethod-">analyze</a></span>&#8203;(<a href="../../../javassist/CtMethod.html" title="class in javassist">CtMethod</a>&nbsp;method)</code></th>
  256. <td class="colLast">
  257. <div class="block">Performs data-flow analysis on a method and returns an array, indexed by
  258. instruction position, containing the starting frame state of all reachable
  259. instructions.</div>
  260. </td>
  261. </tr>
  262. </table>
  263. <ul class="blockList">
  264. <li class="blockList"><a name="methods.inherited.from.class.java.lang.Object">
  265. <!-- -->
  266. </a>
  267. <h3>Methods inherited from class&nbsp;java.lang.Object</h3>
  268. <code>equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait</code></li>
  269. </ul>
  270. </li>
  271. </ul>
  272. </li>
  273. </ul>
  274. </div>
  275. <div class="details">
  276. <ul class="blockList">
  277. <li class="blockList">
  278. <!-- ========= CONSTRUCTOR DETAIL ======== -->
  279. <ul class="blockList">
  280. <li class="blockList"><a name="constructor.detail">
  281. <!-- -->
  282. </a>
  283. <h3>Constructor Detail</h3>
  284. <a name="Analyzer--">
  285. <!-- -->
  286. </a>
  287. <ul class="blockListLast">
  288. <li class="blockList">
  289. <h4>Analyzer</h4>
  290. <pre>public&nbsp;Analyzer()</pre>
  291. </li>
  292. </ul>
  293. </li>
  294. </ul>
  295. <!-- ============ METHOD DETAIL ========== -->
  296. <ul class="blockList">
  297. <li class="blockList"><a name="method.detail">
  298. <!-- -->
  299. </a>
  300. <h3>Method Detail</h3>
  301. <a name="analyze-javassist.CtClass-javassist.bytecode.MethodInfo-">
  302. <!-- -->
  303. </a>
  304. <ul class="blockList">
  305. <li class="blockList">
  306. <h4>analyze</h4>
  307. <pre>public&nbsp;<a href="../../../javassist/bytecode/analysis/Frame.html" title="class in javassist.bytecode.analysis">Frame</a>[]&nbsp;analyze&#8203;(<a href="../../../javassist/CtClass.html" title="class in javassist">CtClass</a>&nbsp;clazz,
  308. <a href="../../../javassist/bytecode/MethodInfo.html" title="class in javassist.bytecode">MethodInfo</a>&nbsp;method)
  309. throws <a href="../../../javassist/bytecode/BadBytecode.html" title="class in javassist.bytecode">BadBytecode</a></pre>
  310. <div class="block">Performs data-flow analysis on a method and returns an array, indexed by
  311. instruction position, containing the starting frame state of all reachable
  312. instructions. Non-reachable code, and illegal code offsets are represented
  313. as a null in the frame state array. This can be used to detect dead code.
  314. If the method does not contain code (it is either native or abstract), null
  315. is returned.</div>
  316. <dl>
  317. <dt><span class="paramLabel">Parameters:</span></dt>
  318. <dd><code>clazz</code> - the declaring class of the method</dd>
  319. <dd><code>method</code> - the method to analyze</dd>
  320. <dt><span class="returnLabel">Returns:</span></dt>
  321. <dd>an array, indexed by instruction position, of the starting frame state,
  322. or null if this method doesn't have code</dd>
  323. <dt><span class="throwsLabel">Throws:</span></dt>
  324. <dd><code><a href="../../../javassist/bytecode/BadBytecode.html" title="class in javassist.bytecode">BadBytecode</a></code> - if the bytecode does not comply with the JVM specification</dd>
  325. </dl>
  326. </li>
  327. </ul>
  328. <a name="analyze-javassist.CtMethod-">
  329. <!-- -->
  330. </a>
  331. <ul class="blockListLast">
  332. <li class="blockList">
  333. <h4>analyze</h4>
  334. <pre>public&nbsp;<a href="../../../javassist/bytecode/analysis/Frame.html" title="class in javassist.bytecode.analysis">Frame</a>[]&nbsp;analyze&#8203;(<a href="../../../javassist/CtMethod.html" title="class in javassist">CtMethod</a>&nbsp;method)
  335. throws <a href="../../../javassist/bytecode/BadBytecode.html" title="class in javassist.bytecode">BadBytecode</a></pre>
  336. <div class="block">Performs data-flow analysis on a method and returns an array, indexed by
  337. instruction position, containing the starting frame state of all reachable
  338. instructions. Non-reachable code, and illegal code offsets are represented
  339. as a null in the frame state array. This can be used to detect dead code.
  340. If the method does not contain code (it is either native or abstract), null
  341. is returned.</div>
  342. <dl>
  343. <dt><span class="paramLabel">Parameters:</span></dt>
  344. <dd><code>method</code> - the method to analyze</dd>
  345. <dt><span class="returnLabel">Returns:</span></dt>
  346. <dd>an array, indexed by instruction position, of the starting frame state,
  347. or null if this method doesn't have code</dd>
  348. <dt><span class="throwsLabel">Throws:</span></dt>
  349. <dd><code><a href="../../../javassist/bytecode/BadBytecode.html" title="class in javassist.bytecode">BadBytecode</a></code> - if the bytecode does not comply with the JVM specification</dd>
  350. </dl>
  351. </li>
  352. </ul>
  353. </li>
  354. </ul>
  355. </li>
  356. </ul>
  357. </div>
  358. </div>
  359. <!-- ========= END OF CLASS DATA ========= -->
  360. <!-- ======= START OF BOTTOM NAVBAR ====== -->
  361. <div class="bottomNav"><a name="navbar.bottom">
  362. <!-- -->
  363. </a>
  364. <div class="skipNav"><a href="#skip.navbar.bottom" title="Skip navigation links">Skip navigation links</a></div>
  365. <a name="navbar.bottom.firstrow">
  366. <!-- -->
  367. </a>
  368. <ul class="navList" title="Navigation">
  369. <li><a href="../../../overview-summary.html">Overview</a></li>
  370. <li><a href="package-summary.html">Package</a></li>
  371. <li class="navBarCell1Rev">Class</li>
  372. <li><a href="class-use/Analyzer.html">Use</a></li>
  373. <li><a href="package-tree.html">Tree</a></li>
  374. <li><a href="../../../deprecated-list.html">Deprecated</a></li>
  375. <li><a href="../../../index-all.html">Index</a></li>
  376. </ul>
  377. </div>
  378. <div class="subNav">
  379. <ul class="navList">
  380. <li>Prev&nbsp;Class</li>
  381. <li><a href="../../../javassist/bytecode/analysis/ControlFlow.html" title="class in javassist.bytecode.analysis"><span class="typeNameLink">Next&nbsp;Class</span></a></li>
  382. </ul>
  383. <ul class="navList">
  384. <li><a href="../../../index.html?javassist/bytecode/analysis/Analyzer.html" target="_top">Frames</a></li>
  385. <li><a href="Analyzer.html" target="_top">No&nbsp;Frames</a></li>
  386. </ul>
  387. <ul class="navList" id="allclasses_navbar_bottom">
  388. <li><a href="../../../allclasses-noframe.html">All&nbsp;Classes</a></li>
  389. </ul>
  390. <div>
  391. <script type="text/javascript"><!--
  392. allClassesLink = document.getElementById("allclasses_navbar_bottom");
  393. if(window==top) {
  394. allClassesLink.style.display = "block";
  395. }
  396. else {
  397. allClassesLink.style.display = "none";
  398. }
  399. //-->
  400. </script>
  401. <noscript>
  402. <div>JavaScript is disabled on your browser.</div>
  403. </noscript>
  404. </div>
  405. <div>
  406. <ul class="subNavList">
  407. <li>Summary:&nbsp;</li>
  408. <li>Nested&nbsp;|&nbsp;</li>
  409. <li>Field&nbsp;|&nbsp;</li>
  410. <li><a href="#constructor.summary">Constr</a>&nbsp;|&nbsp;</li>
  411. <li><a href="#method.summary">Method</a></li>
  412. </ul>
  413. <ul class="subNavList">
  414. <li>Detail:&nbsp;</li>
  415. <li>Field&nbsp;|&nbsp;</li>
  416. <li><a href="#constructor.detail">Constr</a>&nbsp;|&nbsp;</li>
  417. <li><a href="#method.detail">Method</a></li>
  418. </ul>
  419. </div>
  420. <a name="skip.navbar.bottom">
  421. <!-- -->
  422. </a></div>
  423. <!-- ======== END OF BOTTOM NAVBAR ======= -->
  424. <p class="legalCopy"><small><i>Javassist, a Java-bytecode translator toolkit.<br>
  425. Copyright (C) 1999- Shigeru Chiba. All Rights Reserved.</i></small></p>
  426. </body>
  427. </html>