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.

MethodInfo.html 44KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053
  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>MethodInfo (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="MethodInfo (Javassist API)";
  25. }
  26. }
  27. catch(err) {
  28. }
  29. //-->
  30. var methods = {"i0":10,"i1":10,"i2":10,"i3":10,"i4":10,"i5":10,"i6":10,"i7":10,"i8":10,"i9":10,"i10":10,"i11":10,"i12":10,"i13":10,"i14":10,"i15":10,"i16":10,"i17":10,"i18":10,"i19":10,"i20":10,"i21":10,"i22":10,"i23":10,"i24":10,"i25":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/MethodInfo.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><a href="../../javassist/bytecode/LocalVariableTypeAttribute.html" title="class in javassist.bytecode"><span class="typeNameLink">Prev&nbsp;Class</span></a></li>
  62. <li><a href="../../javassist/bytecode/MethodParametersAttribute.html" title="class in javassist.bytecode"><span class="typeNameLink">Next&nbsp;Class</span></a></li>
  63. </ul>
  64. <ul class="navList">
  65. <li><a href="../../index.html?javassist/bytecode/MethodInfo.html" target="_top">Frames</a></li>
  66. <li><a href="MethodInfo.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><a href="#field.summary">Field</a>&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><a href="#field.detail">Field</a>&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/package-summary.html">javassist.bytecode</a></div>
  120. <h2 title="Class MethodInfo" class="title">Class MethodInfo</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.MethodInfo</li>
  128. </ul>
  129. </li>
  130. </ul>
  131. <div class="description">
  132. <ul class="blockList">
  133. <li class="blockList">
  134. <hr>
  135. <pre>public class <span class="typeNameLabel">MethodInfo</span>
  136. extends java.lang.Object</pre>
  137. <div class="block"><code>method_info</code> structure.
  138. <p>The bytecode sequence of the method is represented
  139. by a <code>CodeAttribute</code> object.
  140. <p>The following code adds the default constructor to a class:
  141. of <code>int</code> type:
  142. <blockquote><pre>
  143. ClassFile cf = ...
  144. Bytecode code = new Bytecode(cf.getConstPool());
  145. code.addAload(0);
  146. code.addInvokespecial("java/lang/Object", MethodInfo.nameInit, "()V");
  147. code.addReturn(null);
  148. code.setMaxLocals(1);
  149. MethodInfo minfo = new MethodInfo(cf.getConstPool(), MethodInfo.nameInit, "()V");
  150. minfo.setCodeAttribute(code.toCodeAttribute());
  151. cf.addMethod(minfo);
  152. </pre></blockquote></div>
  153. <dl>
  154. <dt><span class="seeLabel">See Also:</span></dt>
  155. <dd><a href="../../javassist/bytecode/MethodInfo.html#getCodeAttribute--"><code>getCodeAttribute()</code></a>,
  156. <a href="../../javassist/bytecode/CodeAttribute.html" title="class in javassist.bytecode"><code>CodeAttribute</code></a>,
  157. <a href="../../javassist/bytecode/Bytecode.html" title="class in javassist.bytecode"><code>Bytecode</code></a>,
  158. <a href="../../javassist/CtBehavior.html#getMethodInfo--"><code>CtBehavior.getMethodInfo()</code></a>,
  159. <a href="../../javassist/CtBehavior.html#getMethodInfo--"><code>CtBehavior.getMethodInfo()</code></a></dd>
  160. </dl>
  161. </li>
  162. </ul>
  163. </div>
  164. <div class="summary">
  165. <ul class="blockList">
  166. <li class="blockList">
  167. <!-- =========== FIELD SUMMARY =========== -->
  168. <ul class="blockList">
  169. <li class="blockList"><a name="field.summary">
  170. <!-- -->
  171. </a>
  172. <h3>Field Summary</h3>
  173. <table class="memberSummary" summary="Field Summary table, listing fields, and an explanation">
  174. <caption><span>Fields</span><span class="tabEnd">&nbsp;</span></caption>
  175. <tr>
  176. <th class="colFirst" scope="col">Modifier and Type</th>
  177. <th class="colSecond" scope="col">Field</th>
  178. <th class="colLast" scope="col">Description</th>
  179. </tr>
  180. <tr class="altColor">
  181. <td class="colFirst"><code>static boolean</code></td>
  182. <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="../../javassist/bytecode/MethodInfo.html#doPreverify">doPreverify</a></span></code></th>
  183. <td class="colLast">
  184. <div class="block">If this value is true, Javassist maintains a <code>StackMap</code> attribute
  185. generated by the <code>preverify</code> tool of J2ME (CLDC).</div>
  186. </td>
  187. </tr>
  188. <tr class="rowColor">
  189. <td class="colFirst"><code>static java.lang.String</code></td>
  190. <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="../../javassist/bytecode/MethodInfo.html#nameClinit">nameClinit</a></span></code></th>
  191. <td class="colLast">
  192. <div class="block">The name of class initializer (static initializer):
  193. <code>&lt;clinit&gt;</code>.</div>
  194. </td>
  195. </tr>
  196. <tr class="altColor">
  197. <td class="colFirst"><code>static java.lang.String</code></td>
  198. <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="../../javassist/bytecode/MethodInfo.html#nameInit">nameInit</a></span></code></th>
  199. <td class="colLast">
  200. <div class="block">The name of constructors: <code>&lt;init&gt;</code>.</div>
  201. </td>
  202. </tr>
  203. </table>
  204. </li>
  205. </ul>
  206. <!-- ======== CONSTRUCTOR SUMMARY ======== -->
  207. <ul class="blockList">
  208. <li class="blockList"><a name="constructor.summary">
  209. <!-- -->
  210. </a>
  211. <h3>Constructor Summary</h3>
  212. <table class="memberSummary" summary="Constructor Summary table, listing constructors, and an explanation">
  213. <caption><span>Constructors</span><span class="tabEnd">&nbsp;</span></caption>
  214. <tr>
  215. <th class="colFirst" scope="col">Constructor</th>
  216. <th class="colLast" scope="col">Description</th>
  217. </tr>
  218. <tr class="altColor">
  219. <th class="colConstructorName" scope="row"><code><span class="memberNameLink"><a href="../../javassist/bytecode/MethodInfo.html#MethodInfo-javassist.bytecode.ConstPool-java.lang.String-java.lang.String-">MethodInfo</a></span>&#8203;(<a href="../../javassist/bytecode/ConstPool.html" title="class in javassist.bytecode">ConstPool</a>&nbsp;cp,
  220. java.lang.String&nbsp;methodname,
  221. java.lang.String&nbsp;desc)</code></th>
  222. <td class="colLast">
  223. <div class="block">Constructs a <code>method_info</code> structure.</div>
  224. </td>
  225. </tr>
  226. <tr class="rowColor">
  227. <th class="colConstructorName" scope="row"><code><span class="memberNameLink"><a href="../../javassist/bytecode/MethodInfo.html#MethodInfo-javassist.bytecode.ConstPool-java.lang.String-javassist.bytecode.MethodInfo-java.util.Map-">MethodInfo</a></span>&#8203;(<a href="../../javassist/bytecode/ConstPool.html" title="class in javassist.bytecode">ConstPool</a>&nbsp;cp,
  228. java.lang.String&nbsp;methodname,
  229. <a href="../../javassist/bytecode/MethodInfo.html" title="class in javassist.bytecode">MethodInfo</a>&nbsp;src,
  230. java.util.Map&lt;java.lang.String,java.lang.String&gt;&nbsp;classnameMap)</code></th>
  231. <td class="colLast">
  232. <div class="block">Constructs a copy of <code>method_info</code> structure.</div>
  233. </td>
  234. </tr>
  235. </table>
  236. </li>
  237. </ul>
  238. <!-- ========== METHOD SUMMARY =========== -->
  239. <ul class="blockList">
  240. <li class="blockList"><a name="method.summary">
  241. <!-- -->
  242. </a>
  243. <h3>Method Summary</h3>
  244. <table class="memberSummary" summary="Method Summary table, listing methods, and an explanation">
  245. <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>
  246. <tr>
  247. <th class="colFirst" scope="col">Modifier and Type</th>
  248. <th class="colSecond" scope="col">Method</th>
  249. <th class="colLast" scope="col">Description</th>
  250. </tr>
  251. <tr id="i0" class="altColor">
  252. <td class="colFirst"><code>void</code></td>
  253. <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="../../javassist/bytecode/MethodInfo.html#addAttribute-javassist.bytecode.AttributeInfo-">addAttribute</a></span>&#8203;(<a href="../../javassist/bytecode/AttributeInfo.html" title="class in javassist.bytecode">AttributeInfo</a>&nbsp;info)</code></th>
  254. <td class="colLast">
  255. <div class="block">Appends an attribute.</div>
  256. </td>
  257. </tr>
  258. <tr id="i1" class="rowColor">
  259. <td class="colFirst"><code>int</code></td>
  260. <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="../../javassist/bytecode/MethodInfo.html#getAccessFlags--">getAccessFlags</a></span>()</code></th>
  261. <td class="colLast">
  262. <div class="block">Returns access flags.</div>
  263. </td>
  264. </tr>
  265. <tr id="i2" class="altColor">
  266. <td class="colFirst"><code><a href="../../javassist/bytecode/AttributeInfo.html" title="class in javassist.bytecode">AttributeInfo</a></code></td>
  267. <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="../../javassist/bytecode/MethodInfo.html#getAttribute-java.lang.String-">getAttribute</a></span>&#8203;(java.lang.String&nbsp;name)</code></th>
  268. <td class="colLast">
  269. <div class="block">Returns the attribute with the specified name.</div>
  270. </td>
  271. </tr>
  272. <tr id="i3" class="rowColor">
  273. <td class="colFirst"><code>java.util.List&lt;<a href="../../javassist/bytecode/AttributeInfo.html" title="class in javassist.bytecode">AttributeInfo</a>&gt;</code></td>
  274. <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="../../javassist/bytecode/MethodInfo.html#getAttributes--">getAttributes</a></span>()</code></th>
  275. <td class="colLast">
  276. <div class="block">Returns all the attributes.</div>
  277. </td>
  278. </tr>
  279. <tr id="i4" class="altColor">
  280. <td class="colFirst"><code><a href="../../javassist/bytecode/CodeAttribute.html" title="class in javassist.bytecode">CodeAttribute</a></code></td>
  281. <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="../../javassist/bytecode/MethodInfo.html#getCodeAttribute--">getCodeAttribute</a></span>()</code></th>
  282. <td class="colLast">
  283. <div class="block">Returns a Code attribute.</div>
  284. </td>
  285. </tr>
  286. <tr id="i5" class="rowColor">
  287. <td class="colFirst"><code><a href="../../javassist/bytecode/ConstPool.html" title="class in javassist.bytecode">ConstPool</a></code></td>
  288. <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="../../javassist/bytecode/MethodInfo.html#getConstPool--">getConstPool</a></span>()</code></th>
  289. <td class="colLast">
  290. <div class="block">Returns a constant pool table used by this method.</div>
  291. </td>
  292. </tr>
  293. <tr id="i6" class="altColor">
  294. <td class="colFirst"><code>java.lang.String</code></td>
  295. <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="../../javassist/bytecode/MethodInfo.html#getDescriptor--">getDescriptor</a></span>()</code></th>
  296. <td class="colLast">
  297. <div class="block">Returns a method descriptor.</div>
  298. </td>
  299. </tr>
  300. <tr id="i7" class="rowColor">
  301. <td class="colFirst"><code><a href="../../javassist/bytecode/ExceptionsAttribute.html" title="class in javassist.bytecode">ExceptionsAttribute</a></code></td>
  302. <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="../../javassist/bytecode/MethodInfo.html#getExceptionsAttribute--">getExceptionsAttribute</a></span>()</code></th>
  303. <td class="colLast">
  304. <div class="block">Returns an Exceptions attribute.</div>
  305. </td>
  306. </tr>
  307. <tr id="i8" class="altColor">
  308. <td class="colFirst"><code>int</code></td>
  309. <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="../../javassist/bytecode/MethodInfo.html#getLineNumber-int-">getLineNumber</a></span>&#8203;(int&nbsp;pos)</code></th>
  310. <td class="colLast">
  311. <div class="block">Returns the line number of the source line corresponding to the specified
  312. bytecode contained in this method.</div>
  313. </td>
  314. </tr>
  315. <tr id="i9" class="rowColor">
  316. <td class="colFirst"><code>java.lang.String</code></td>
  317. <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="../../javassist/bytecode/MethodInfo.html#getName--">getName</a></span>()</code></th>
  318. <td class="colLast">
  319. <div class="block">Returns a method name.</div>
  320. </td>
  321. </tr>
  322. <tr id="i10" class="altColor">
  323. <td class="colFirst"><code>boolean</code></td>
  324. <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="../../javassist/bytecode/MethodInfo.html#isConstructor--">isConstructor</a></span>()</code></th>
  325. <td class="colLast">
  326. <div class="block">Returns true if this is a constructor.</div>
  327. </td>
  328. </tr>
  329. <tr id="i11" class="rowColor">
  330. <td class="colFirst"><code>boolean</code></td>
  331. <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="../../javassist/bytecode/MethodInfo.html#isMethod--">isMethod</a></span>()</code></th>
  332. <td class="colLast">
  333. <div class="block">Returns true if this is not a constructor or a class initializer (static
  334. initializer).</div>
  335. </td>
  336. </tr>
  337. <tr id="i12" class="altColor">
  338. <td class="colFirst"><code>boolean</code></td>
  339. <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="../../javassist/bytecode/MethodInfo.html#isStaticInitializer--">isStaticInitializer</a></span>()</code></th>
  340. <td class="colLast">
  341. <div class="block">Returns true if this is a class initializer (static initializer).</div>
  342. </td>
  343. </tr>
  344. <tr id="i13" class="rowColor">
  345. <td class="colFirst"><code>void</code></td>
  346. <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="../../javassist/bytecode/MethodInfo.html#rebuildStackMap-javassist.ClassPool-">rebuildStackMap</a></span>&#8203;(<a href="../../javassist/ClassPool.html" title="class in javassist">ClassPool</a>&nbsp;pool)</code></th>
  347. <td class="colLast">
  348. <div class="block">Rebuilds a stack map table.</div>
  349. </td>
  350. </tr>
  351. <tr id="i14" class="altColor">
  352. <td class="colFirst"><code>void</code></td>
  353. <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="../../javassist/bytecode/MethodInfo.html#rebuildStackMapForME-javassist.ClassPool-">rebuildStackMapForME</a></span>&#8203;(<a href="../../javassist/ClassPool.html" title="class in javassist">ClassPool</a>&nbsp;pool)</code></th>
  354. <td class="colLast">
  355. <div class="block">Rebuilds a stack map table for J2ME (CLDC).</div>
  356. </td>
  357. </tr>
  358. <tr id="i15" class="rowColor">
  359. <td class="colFirst"><code>void</code></td>
  360. <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="../../javassist/bytecode/MethodInfo.html#rebuildStackMapIf6-javassist.ClassPool-javassist.bytecode.ClassFile-">rebuildStackMapIf6</a></span>&#8203;(<a href="../../javassist/ClassPool.html" title="class in javassist">ClassPool</a>&nbsp;pool,
  361. <a href="../../javassist/bytecode/ClassFile.html" title="class in javassist.bytecode">ClassFile</a>&nbsp;cf)</code></th>
  362. <td class="colLast">
  363. <div class="block">Rebuilds a stack map table if the class file is for Java 6
  364. or later.</div>
  365. </td>
  366. </tr>
  367. <tr id="i16" class="altColor">
  368. <td class="colFirst"><code><a href="../../javassist/bytecode/AttributeInfo.html" title="class in javassist.bytecode">AttributeInfo</a></code></td>
  369. <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="../../javassist/bytecode/MethodInfo.html#removeAttribute-java.lang.String-">removeAttribute</a></span>&#8203;(java.lang.String&nbsp;name)</code></th>
  370. <td class="colLast">
  371. <div class="block">Removes an attribute with the specified name.</div>
  372. </td>
  373. </tr>
  374. <tr id="i17" class="rowColor">
  375. <td class="colFirst"><code>void</code></td>
  376. <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="../../javassist/bytecode/MethodInfo.html#removeCodeAttribute--">removeCodeAttribute</a></span>()</code></th>
  377. <td class="colLast">
  378. <div class="block">Removes a Code attribute.</div>
  379. </td>
  380. </tr>
  381. <tr id="i18" class="altColor">
  382. <td class="colFirst"><code>void</code></td>
  383. <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="../../javassist/bytecode/MethodInfo.html#removeExceptionsAttribute--">removeExceptionsAttribute</a></span>()</code></th>
  384. <td class="colLast">
  385. <div class="block">Removes an Exception attribute.</div>
  386. </td>
  387. </tr>
  388. <tr id="i19" class="rowColor">
  389. <td class="colFirst"><code>void</code></td>
  390. <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="../../javassist/bytecode/MethodInfo.html#setAccessFlags-int-">setAccessFlags</a></span>&#8203;(int&nbsp;acc)</code></th>
  391. <td class="colLast">
  392. <div class="block">Sets access flags.</div>
  393. </td>
  394. </tr>
  395. <tr id="i20" class="altColor">
  396. <td class="colFirst"><code>void</code></td>
  397. <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="../../javassist/bytecode/MethodInfo.html#setCodeAttribute-javassist.bytecode.CodeAttribute-">setCodeAttribute</a></span>&#8203;(<a href="../../javassist/bytecode/CodeAttribute.html" title="class in javassist.bytecode">CodeAttribute</a>&nbsp;cattr)</code></th>
  398. <td class="colLast">
  399. <div class="block">Adds a Code attribute.</div>
  400. </td>
  401. </tr>
  402. <tr id="i21" class="rowColor">
  403. <td class="colFirst"><code>void</code></td>
  404. <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="../../javassist/bytecode/MethodInfo.html#setDescriptor-java.lang.String-">setDescriptor</a></span>&#8203;(java.lang.String&nbsp;desc)</code></th>
  405. <td class="colLast">
  406. <div class="block">Sets a method descriptor.</div>
  407. </td>
  408. </tr>
  409. <tr id="i22" class="altColor">
  410. <td class="colFirst"><code>void</code></td>
  411. <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="../../javassist/bytecode/MethodInfo.html#setExceptionsAttribute-javassist.bytecode.ExceptionsAttribute-">setExceptionsAttribute</a></span>&#8203;(<a href="../../javassist/bytecode/ExceptionsAttribute.html" title="class in javassist.bytecode">ExceptionsAttribute</a>&nbsp;cattr)</code></th>
  412. <td class="colLast">
  413. <div class="block">Adds an Exception attribute.</div>
  414. </td>
  415. </tr>
  416. <tr id="i23" class="rowColor">
  417. <td class="colFirst"><code>void</code></td>
  418. <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="../../javassist/bytecode/MethodInfo.html#setName-java.lang.String-">setName</a></span>&#8203;(java.lang.String&nbsp;newName)</code></th>
  419. <td class="colLast">
  420. <div class="block">Sets a method name.</div>
  421. </td>
  422. </tr>
  423. <tr id="i24" class="altColor">
  424. <td class="colFirst"><code>void</code></td>
  425. <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="../../javassist/bytecode/MethodInfo.html#setSuperclass-java.lang.String-">setSuperclass</a></span>&#8203;(java.lang.String&nbsp;superclass)</code></th>
  426. <td class="colLast">
  427. <div class="block">Changes a super constructor called by this constructor.</div>
  428. </td>
  429. </tr>
  430. <tr id="i25" class="rowColor">
  431. <td class="colFirst"><code>java.lang.String</code></td>
  432. <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="../../javassist/bytecode/MethodInfo.html#toString--">toString</a></span>()</code></th>
  433. <td class="colLast">
  434. <div class="block">Returns a string representation of the object.</div>
  435. </td>
  436. </tr>
  437. </table>
  438. <ul class="blockList">
  439. <li class="blockList"><a name="methods.inherited.from.class.java.lang.Object">
  440. <!-- -->
  441. </a>
  442. <h3>Methods inherited from class&nbsp;java.lang.Object</h3>
  443. <code>equals, getClass, hashCode, notify, notifyAll, wait, wait, wait</code></li>
  444. </ul>
  445. </li>
  446. </ul>
  447. </li>
  448. </ul>
  449. </div>
  450. <div class="details">
  451. <ul class="blockList">
  452. <li class="blockList">
  453. <!-- ============ FIELD DETAIL =========== -->
  454. <ul class="blockList">
  455. <li class="blockList"><a name="field.detail">
  456. <!-- -->
  457. </a>
  458. <h3>Field Detail</h3>
  459. <a name="doPreverify">
  460. <!-- -->
  461. </a>
  462. <ul class="blockList">
  463. <li class="blockList">
  464. <h4>doPreverify</h4>
  465. <pre>public static&nbsp;boolean doPreverify</pre>
  466. <div class="block">If this value is true, Javassist maintains a <code>StackMap</code> attribute
  467. generated by the <code>preverify</code> tool of J2ME (CLDC). The initial
  468. value of this field is <code>false</code>.</div>
  469. </li>
  470. </ul>
  471. <a name="nameInit">
  472. <!-- -->
  473. </a>
  474. <ul class="blockList">
  475. <li class="blockList">
  476. <h4>nameInit</h4>
  477. <pre>public static final&nbsp;java.lang.String nameInit</pre>
  478. <div class="block">The name of constructors: <code>&lt;init&gt;</code>.</div>
  479. <dl>
  480. <dt><span class="seeLabel">See Also:</span></dt>
  481. <dd><a href="../../constant-values.html#javassist.bytecode.MethodInfo.nameInit">Constant Field Values</a></dd>
  482. </dl>
  483. </li>
  484. </ul>
  485. <a name="nameClinit">
  486. <!-- -->
  487. </a>
  488. <ul class="blockListLast">
  489. <li class="blockList">
  490. <h4>nameClinit</h4>
  491. <pre>public static final&nbsp;java.lang.String nameClinit</pre>
  492. <div class="block">The name of class initializer (static initializer):
  493. <code>&lt;clinit&gt;</code>.</div>
  494. <dl>
  495. <dt><span class="seeLabel">See Also:</span></dt>
  496. <dd><a href="../../constant-values.html#javassist.bytecode.MethodInfo.nameClinit">Constant Field Values</a></dd>
  497. </dl>
  498. </li>
  499. </ul>
  500. </li>
  501. </ul>
  502. <!-- ========= CONSTRUCTOR DETAIL ======== -->
  503. <ul class="blockList">
  504. <li class="blockList"><a name="constructor.detail">
  505. <!-- -->
  506. </a>
  507. <h3>Constructor Detail</h3>
  508. <a name="MethodInfo-javassist.bytecode.ConstPool-java.lang.String-java.lang.String-">
  509. <!-- -->
  510. </a>
  511. <ul class="blockList">
  512. <li class="blockList">
  513. <h4>MethodInfo</h4>
  514. <pre>public&nbsp;MethodInfo&#8203;(<a href="../../javassist/bytecode/ConstPool.html" title="class in javassist.bytecode">ConstPool</a>&nbsp;cp,
  515. java.lang.String&nbsp;methodname,
  516. java.lang.String&nbsp;desc)</pre>
  517. <div class="block">Constructs a <code>method_info</code> structure. The initial value of
  518. <code>access_flags</code> is zero.</div>
  519. <dl>
  520. <dt><span class="paramLabel">Parameters:</span></dt>
  521. <dd><code>cp</code> - a constant pool table</dd>
  522. <dd><code>methodname</code> - method name</dd>
  523. <dd><code>desc</code> - method descriptor</dd>
  524. <dt><span class="seeLabel">See Also:</span></dt>
  525. <dd><a href="../../javassist/bytecode/Descriptor.html" title="class in javassist.bytecode"><code>Descriptor</code></a></dd>
  526. </dl>
  527. </li>
  528. </ul>
  529. <a name="MethodInfo-javassist.bytecode.ConstPool-java.lang.String-javassist.bytecode.MethodInfo-java.util.Map-">
  530. <!-- -->
  531. </a>
  532. <ul class="blockListLast">
  533. <li class="blockList">
  534. <h4>MethodInfo</h4>
  535. <pre>public&nbsp;MethodInfo&#8203;(<a href="../../javassist/bytecode/ConstPool.html" title="class in javassist.bytecode">ConstPool</a>&nbsp;cp,
  536. java.lang.String&nbsp;methodname,
  537. <a href="../../javassist/bytecode/MethodInfo.html" title="class in javassist.bytecode">MethodInfo</a>&nbsp;src,
  538. java.util.Map&lt;java.lang.String,java.lang.String&gt;&nbsp;classnameMap)
  539. throws <a href="../../javassist/bytecode/BadBytecode.html" title="class in javassist.bytecode">BadBytecode</a></pre>
  540. <div class="block">Constructs a copy of <code>method_info</code> structure. Class names
  541. appearing in the source <code>method_info</code> are renamed according
  542. to <code>classnameMap</code>.
  543. <p>
  544. Note: only <code>Code</code> and <code>Exceptions</code> attributes
  545. are copied from the source. The other attributes are ignored.</div>
  546. <dl>
  547. <dt><span class="paramLabel">Parameters:</span></dt>
  548. <dd><code>cp</code> - a constant pool table</dd>
  549. <dd><code>methodname</code> - a method name</dd>
  550. <dd><code>src</code> - a source <code>method_info</code></dd>
  551. <dd><code>classnameMap</code> - specifies pairs of replaced and substituted name.</dd>
  552. <dt><span class="throwsLabel">Throws:</span></dt>
  553. <dd><code><a href="../../javassist/bytecode/BadBytecode.html" title="class in javassist.bytecode">BadBytecode</a></code></dd>
  554. <dt><span class="seeLabel">See Also:</span></dt>
  555. <dd><a href="../../javassist/bytecode/Descriptor.html" title="class in javassist.bytecode"><code>Descriptor</code></a></dd>
  556. </dl>
  557. </li>
  558. </ul>
  559. </li>
  560. </ul>
  561. <!-- ============ METHOD DETAIL ========== -->
  562. <ul class="blockList">
  563. <li class="blockList"><a name="method.detail">
  564. <!-- -->
  565. </a>
  566. <h3>Method Detail</h3>
  567. <a name="toString--">
  568. <!-- -->
  569. </a>
  570. <ul class="blockList">
  571. <li class="blockList">
  572. <h4>toString</h4>
  573. <pre>public&nbsp;java.lang.String&nbsp;toString()</pre>
  574. <div class="block">Returns a string representation of the object.</div>
  575. <dl>
  576. <dt><span class="overrideSpecifyLabel">Overrides:</span></dt>
  577. <dd><code>toString</code>&nbsp;in class&nbsp;<code>java.lang.Object</code></dd>
  578. </dl>
  579. </li>
  580. </ul>
  581. <a name="getName--">
  582. <!-- -->
  583. </a>
  584. <ul class="blockList">
  585. <li class="blockList">
  586. <h4>getName</h4>
  587. <pre>public&nbsp;java.lang.String&nbsp;getName()</pre>
  588. <div class="block">Returns a method name.</div>
  589. </li>
  590. </ul>
  591. <a name="setName-java.lang.String-">
  592. <!-- -->
  593. </a>
  594. <ul class="blockList">
  595. <li class="blockList">
  596. <h4>setName</h4>
  597. <pre>public&nbsp;void&nbsp;setName&#8203;(java.lang.String&nbsp;newName)</pre>
  598. <div class="block">Sets a method name.</div>
  599. </li>
  600. </ul>
  601. <a name="isMethod--">
  602. <!-- -->
  603. </a>
  604. <ul class="blockList">
  605. <li class="blockList">
  606. <h4>isMethod</h4>
  607. <pre>public&nbsp;boolean&nbsp;isMethod()</pre>
  608. <div class="block">Returns true if this is not a constructor or a class initializer (static
  609. initializer).</div>
  610. </li>
  611. </ul>
  612. <a name="getConstPool--">
  613. <!-- -->
  614. </a>
  615. <ul class="blockList">
  616. <li class="blockList">
  617. <h4>getConstPool</h4>
  618. <pre>public&nbsp;<a href="../../javassist/bytecode/ConstPool.html" title="class in javassist.bytecode">ConstPool</a>&nbsp;getConstPool()</pre>
  619. <div class="block">Returns a constant pool table used by this method.</div>
  620. </li>
  621. </ul>
  622. <a name="isConstructor--">
  623. <!-- -->
  624. </a>
  625. <ul class="blockList">
  626. <li class="blockList">
  627. <h4>isConstructor</h4>
  628. <pre>public&nbsp;boolean&nbsp;isConstructor()</pre>
  629. <div class="block">Returns true if this is a constructor.</div>
  630. </li>
  631. </ul>
  632. <a name="isStaticInitializer--">
  633. <!-- -->
  634. </a>
  635. <ul class="blockList">
  636. <li class="blockList">
  637. <h4>isStaticInitializer</h4>
  638. <pre>public&nbsp;boolean&nbsp;isStaticInitializer()</pre>
  639. <div class="block">Returns true if this is a class initializer (static initializer).</div>
  640. </li>
  641. </ul>
  642. <a name="getAccessFlags--">
  643. <!-- -->
  644. </a>
  645. <ul class="blockList">
  646. <li class="blockList">
  647. <h4>getAccessFlags</h4>
  648. <pre>public&nbsp;int&nbsp;getAccessFlags()</pre>
  649. <div class="block">Returns access flags.</div>
  650. <dl>
  651. <dt><span class="seeLabel">See Also:</span></dt>
  652. <dd><a href="../../javassist/bytecode/AccessFlag.html" title="class in javassist.bytecode"><code>AccessFlag</code></a></dd>
  653. </dl>
  654. </li>
  655. </ul>
  656. <a name="setAccessFlags-int-">
  657. <!-- -->
  658. </a>
  659. <ul class="blockList">
  660. <li class="blockList">
  661. <h4>setAccessFlags</h4>
  662. <pre>public&nbsp;void&nbsp;setAccessFlags&#8203;(int&nbsp;acc)</pre>
  663. <div class="block">Sets access flags.</div>
  664. <dl>
  665. <dt><span class="seeLabel">See Also:</span></dt>
  666. <dd><a href="../../javassist/bytecode/AccessFlag.html" title="class in javassist.bytecode"><code>AccessFlag</code></a></dd>
  667. </dl>
  668. </li>
  669. </ul>
  670. <a name="getDescriptor--">
  671. <!-- -->
  672. </a>
  673. <ul class="blockList">
  674. <li class="blockList">
  675. <h4>getDescriptor</h4>
  676. <pre>public&nbsp;java.lang.String&nbsp;getDescriptor()</pre>
  677. <div class="block">Returns a method descriptor.</div>
  678. <dl>
  679. <dt><span class="seeLabel">See Also:</span></dt>
  680. <dd><a href="../../javassist/bytecode/Descriptor.html" title="class in javassist.bytecode"><code>Descriptor</code></a></dd>
  681. </dl>
  682. </li>
  683. </ul>
  684. <a name="setDescriptor-java.lang.String-">
  685. <!-- -->
  686. </a>
  687. <ul class="blockList">
  688. <li class="blockList">
  689. <h4>setDescriptor</h4>
  690. <pre>public&nbsp;void&nbsp;setDescriptor&#8203;(java.lang.String&nbsp;desc)</pre>
  691. <div class="block">Sets a method descriptor.</div>
  692. <dl>
  693. <dt><span class="seeLabel">See Also:</span></dt>
  694. <dd><a href="../../javassist/bytecode/Descriptor.html" title="class in javassist.bytecode"><code>Descriptor</code></a></dd>
  695. </dl>
  696. </li>
  697. </ul>
  698. <a name="getAttributes--">
  699. <!-- -->
  700. </a>
  701. <ul class="blockList">
  702. <li class="blockList">
  703. <h4>getAttributes</h4>
  704. <pre>public&nbsp;java.util.List&lt;<a href="../../javassist/bytecode/AttributeInfo.html" title="class in javassist.bytecode">AttributeInfo</a>&gt;&nbsp;getAttributes()</pre>
  705. <div class="block">Returns all the attributes. The returned <code>List</code> object
  706. is shared with this object. If you add a new attribute to the list,
  707. the attribute is also added to the method represented by this
  708. object. If you remove an attribute from the list, it is also removed
  709. from the method.</div>
  710. <dl>
  711. <dt><span class="returnLabel">Returns:</span></dt>
  712. <dd>a list of <code>AttributeInfo</code> objects.</dd>
  713. <dt><span class="seeLabel">See Also:</span></dt>
  714. <dd><a href="../../javassist/bytecode/AttributeInfo.html" title="class in javassist.bytecode"><code>AttributeInfo</code></a></dd>
  715. </dl>
  716. </li>
  717. </ul>
  718. <a name="getAttribute-java.lang.String-">
  719. <!-- -->
  720. </a>
  721. <ul class="blockList">
  722. <li class="blockList">
  723. <h4>getAttribute</h4>
  724. <pre>public&nbsp;<a href="../../javassist/bytecode/AttributeInfo.html" title="class in javassist.bytecode">AttributeInfo</a>&nbsp;getAttribute&#8203;(java.lang.String&nbsp;name)</pre>
  725. <div class="block">Returns the attribute with the specified name. If it is not found, this
  726. method returns null.
  727. <p>An attribute name can be obtained by, for example,
  728. <a href="../../javassist/bytecode/AnnotationsAttribute.html#visibleTag"><code>AnnotationsAttribute.visibleTag</code></a> or
  729. <a href="../../javassist/bytecode/AnnotationsAttribute.html#invisibleTag"><code>AnnotationsAttribute.invisibleTag</code></a>.
  730. </p></div>
  731. <dl>
  732. <dt><span class="paramLabel">Parameters:</span></dt>
  733. <dd><code>name</code> - attribute name</dd>
  734. <dt><span class="returnLabel">Returns:</span></dt>
  735. <dd>an <code>AttributeInfo</code> object or null.</dd>
  736. <dt><span class="seeLabel">See Also:</span></dt>
  737. <dd><a href="../../javassist/bytecode/MethodInfo.html#getAttributes--"><code>getAttributes()</code></a></dd>
  738. </dl>
  739. </li>
  740. </ul>
  741. <a name="removeAttribute-java.lang.String-">
  742. <!-- -->
  743. </a>
  744. <ul class="blockList">
  745. <li class="blockList">
  746. <h4>removeAttribute</h4>
  747. <pre>public&nbsp;<a href="../../javassist/bytecode/AttributeInfo.html" title="class in javassist.bytecode">AttributeInfo</a>&nbsp;removeAttribute&#8203;(java.lang.String&nbsp;name)</pre>
  748. <div class="block">Removes an attribute with the specified name.</div>
  749. <dl>
  750. <dt><span class="paramLabel">Parameters:</span></dt>
  751. <dd><code>name</code> - attribute name.</dd>
  752. <dt><span class="returnLabel">Returns:</span></dt>
  753. <dd>the removed attribute or null.</dd>
  754. <dt><span class="simpleTagLabel">Since:</span></dt>
  755. <dd>3.21</dd>
  756. </dl>
  757. </li>
  758. </ul>
  759. <a name="addAttribute-javassist.bytecode.AttributeInfo-">
  760. <!-- -->
  761. </a>
  762. <ul class="blockList">
  763. <li class="blockList">
  764. <h4>addAttribute</h4>
  765. <pre>public&nbsp;void&nbsp;addAttribute&#8203;(<a href="../../javassist/bytecode/AttributeInfo.html" title="class in javassist.bytecode">AttributeInfo</a>&nbsp;info)</pre>
  766. <div class="block">Appends an attribute. If there is already an attribute with the same
  767. name, the new one substitutes for it.</div>
  768. <dl>
  769. <dt><span class="seeLabel">See Also:</span></dt>
  770. <dd><a href="../../javassist/bytecode/MethodInfo.html#getAttributes--"><code>getAttributes()</code></a></dd>
  771. </dl>
  772. </li>
  773. </ul>
  774. <a name="getExceptionsAttribute--">
  775. <!-- -->
  776. </a>
  777. <ul class="blockList">
  778. <li class="blockList">
  779. <h4>getExceptionsAttribute</h4>
  780. <pre>public&nbsp;<a href="../../javassist/bytecode/ExceptionsAttribute.html" title="class in javassist.bytecode">ExceptionsAttribute</a>&nbsp;getExceptionsAttribute()</pre>
  781. <div class="block">Returns an Exceptions attribute.</div>
  782. <dl>
  783. <dt><span class="returnLabel">Returns:</span></dt>
  784. <dd>an Exceptions attribute or null if it is not specified.</dd>
  785. </dl>
  786. </li>
  787. </ul>
  788. <a name="getCodeAttribute--">
  789. <!-- -->
  790. </a>
  791. <ul class="blockList">
  792. <li class="blockList">
  793. <h4>getCodeAttribute</h4>
  794. <pre>public&nbsp;<a href="../../javassist/bytecode/CodeAttribute.html" title="class in javassist.bytecode">CodeAttribute</a>&nbsp;getCodeAttribute()</pre>
  795. <div class="block">Returns a Code attribute.</div>
  796. <dl>
  797. <dt><span class="returnLabel">Returns:</span></dt>
  798. <dd>a Code attribute or null if it is not specified.</dd>
  799. </dl>
  800. </li>
  801. </ul>
  802. <a name="removeExceptionsAttribute--">
  803. <!-- -->
  804. </a>
  805. <ul class="blockList">
  806. <li class="blockList">
  807. <h4>removeExceptionsAttribute</h4>
  808. <pre>public&nbsp;void&nbsp;removeExceptionsAttribute()</pre>
  809. <div class="block">Removes an Exception attribute.</div>
  810. </li>
  811. </ul>
  812. <a name="setExceptionsAttribute-javassist.bytecode.ExceptionsAttribute-">
  813. <!-- -->
  814. </a>
  815. <ul class="blockList">
  816. <li class="blockList">
  817. <h4>setExceptionsAttribute</h4>
  818. <pre>public&nbsp;void&nbsp;setExceptionsAttribute&#8203;(<a href="../../javassist/bytecode/ExceptionsAttribute.html" title="class in javassist.bytecode">ExceptionsAttribute</a>&nbsp;cattr)</pre>
  819. <div class="block">Adds an Exception attribute.
  820. <p>
  821. The added attribute must share the same constant pool table as this
  822. <code>method_info</code> structure.</div>
  823. </li>
  824. </ul>
  825. <a name="removeCodeAttribute--">
  826. <!-- -->
  827. </a>
  828. <ul class="blockList">
  829. <li class="blockList">
  830. <h4>removeCodeAttribute</h4>
  831. <pre>public&nbsp;void&nbsp;removeCodeAttribute()</pre>
  832. <div class="block">Removes a Code attribute.</div>
  833. </li>
  834. </ul>
  835. <a name="setCodeAttribute-javassist.bytecode.CodeAttribute-">
  836. <!-- -->
  837. </a>
  838. <ul class="blockList">
  839. <li class="blockList">
  840. <h4>setCodeAttribute</h4>
  841. <pre>public&nbsp;void&nbsp;setCodeAttribute&#8203;(<a href="../../javassist/bytecode/CodeAttribute.html" title="class in javassist.bytecode">CodeAttribute</a>&nbsp;cattr)</pre>
  842. <div class="block">Adds a Code attribute.
  843. <p>
  844. The added attribute must share the same constant pool table as this
  845. <code>method_info</code> structure.</div>
  846. </li>
  847. </ul>
  848. <a name="rebuildStackMapIf6-javassist.ClassPool-javassist.bytecode.ClassFile-">
  849. <!-- -->
  850. </a>
  851. <ul class="blockList">
  852. <li class="blockList">
  853. <h4>rebuildStackMapIf6</h4>
  854. <pre>public&nbsp;void&nbsp;rebuildStackMapIf6&#8203;(<a href="../../javassist/ClassPool.html" title="class in javassist">ClassPool</a>&nbsp;pool,
  855. <a href="../../javassist/bytecode/ClassFile.html" title="class in javassist.bytecode">ClassFile</a>&nbsp;cf)
  856. throws <a href="../../javassist/bytecode/BadBytecode.html" title="class in javassist.bytecode">BadBytecode</a></pre>
  857. <div class="block">Rebuilds a stack map table if the class file is for Java 6
  858. or later. Java 5 or older Java VMs do not recognize a stack
  859. map table. If <code>doPreverify</code> is true, this method
  860. also rebuilds a stack map for J2ME (CLDC).</div>
  861. <dl>
  862. <dt><span class="paramLabel">Parameters:</span></dt>
  863. <dd><code>pool</code> - used for making type hierarchy.</dd>
  864. <dd><code>cf</code> - rebuild if this class file is for Java 6 or later.</dd>
  865. <dt><span class="throwsLabel">Throws:</span></dt>
  866. <dd><code><a href="../../javassist/bytecode/BadBytecode.html" title="class in javassist.bytecode">BadBytecode</a></code></dd>
  867. <dt><span class="simpleTagLabel">Since:</span></dt>
  868. <dd>3.6</dd>
  869. <dt><span class="seeLabel">See Also:</span></dt>
  870. <dd><a href="../../javassist/bytecode/MethodInfo.html#rebuildStackMap-javassist.ClassPool-"><code>rebuildStackMap(ClassPool)</code></a>,
  871. <a href="../../javassist/bytecode/MethodInfo.html#rebuildStackMapForME-javassist.ClassPool-"><code>rebuildStackMapForME(ClassPool)</code></a>,
  872. <a href="../../javassist/bytecode/MethodInfo.html#doPreverify"><code>doPreverify</code></a></dd>
  873. </dl>
  874. </li>
  875. </ul>
  876. <a name="rebuildStackMap-javassist.ClassPool-">
  877. <!-- -->
  878. </a>
  879. <ul class="blockList">
  880. <li class="blockList">
  881. <h4>rebuildStackMap</h4>
  882. <pre>public&nbsp;void&nbsp;rebuildStackMap&#8203;(<a href="../../javassist/ClassPool.html" title="class in javassist">ClassPool</a>&nbsp;pool)
  883. throws <a href="../../javassist/bytecode/BadBytecode.html" title="class in javassist.bytecode">BadBytecode</a></pre>
  884. <div class="block">Rebuilds a stack map table. If no stack map table is included,
  885. a new one is created. If this <code>MethodInfo</code> does not
  886. include a code attribute, nothing happens.</div>
  887. <dl>
  888. <dt><span class="paramLabel">Parameters:</span></dt>
  889. <dd><code>pool</code> - used for making type hierarchy.</dd>
  890. <dt><span class="throwsLabel">Throws:</span></dt>
  891. <dd><code><a href="../../javassist/bytecode/BadBytecode.html" title="class in javassist.bytecode">BadBytecode</a></code></dd>
  892. <dt><span class="simpleTagLabel">Since:</span></dt>
  893. <dd>3.6</dd>
  894. <dt><span class="seeLabel">See Also:</span></dt>
  895. <dd><a href="../../javassist/bytecode/StackMapTable.html" title="class in javassist.bytecode"><code>StackMapTable</code></a></dd>
  896. </dl>
  897. </li>
  898. </ul>
  899. <a name="rebuildStackMapForME-javassist.ClassPool-">
  900. <!-- -->
  901. </a>
  902. <ul class="blockList">
  903. <li class="blockList">
  904. <h4>rebuildStackMapForME</h4>
  905. <pre>public&nbsp;void&nbsp;rebuildStackMapForME&#8203;(<a href="../../javassist/ClassPool.html" title="class in javassist">ClassPool</a>&nbsp;pool)
  906. throws <a href="../../javassist/bytecode/BadBytecode.html" title="class in javassist.bytecode">BadBytecode</a></pre>
  907. <div class="block">Rebuilds a stack map table for J2ME (CLDC). If no stack map table is included,
  908. a new one is created. If this <code>MethodInfo</code> does not
  909. include a code attribute, nothing happens.</div>
  910. <dl>
  911. <dt><span class="paramLabel">Parameters:</span></dt>
  912. <dd><code>pool</code> - used for making type hierarchy.</dd>
  913. <dt><span class="throwsLabel">Throws:</span></dt>
  914. <dd><code><a href="../../javassist/bytecode/BadBytecode.html" title="class in javassist.bytecode">BadBytecode</a></code></dd>
  915. <dt><span class="simpleTagLabel">Since:</span></dt>
  916. <dd>3.12</dd>
  917. <dt><span class="seeLabel">See Also:</span></dt>
  918. <dd><a href="../../javassist/bytecode/StackMap.html" title="class in javassist.bytecode"><code>StackMap</code></a></dd>
  919. </dl>
  920. </li>
  921. </ul>
  922. <a name="getLineNumber-int-">
  923. <!-- -->
  924. </a>
  925. <ul class="blockList">
  926. <li class="blockList">
  927. <h4>getLineNumber</h4>
  928. <pre>public&nbsp;int&nbsp;getLineNumber&#8203;(int&nbsp;pos)</pre>
  929. <div class="block">Returns the line number of the source line corresponding to the specified
  930. bytecode contained in this method.</div>
  931. <dl>
  932. <dt><span class="paramLabel">Parameters:</span></dt>
  933. <dd><code>pos</code> - the position of the bytecode (&gt;= 0). an index into the code
  934. array.</dd>
  935. <dt><span class="returnLabel">Returns:</span></dt>
  936. <dd>-1 if this information is not available.</dd>
  937. </dl>
  938. </li>
  939. </ul>
  940. <a name="setSuperclass-java.lang.String-">
  941. <!-- -->
  942. </a>
  943. <ul class="blockListLast">
  944. <li class="blockList">
  945. <h4>setSuperclass</h4>
  946. <pre>public&nbsp;void&nbsp;setSuperclass&#8203;(java.lang.String&nbsp;superclass)
  947. throws <a href="../../javassist/bytecode/BadBytecode.html" title="class in javassist.bytecode">BadBytecode</a></pre>
  948. <div class="block">Changes a super constructor called by this constructor.
  949. <p>
  950. This method modifies a call to <code>super()</code>, which should be
  951. at the head of a constructor body, so that a constructor in a different
  952. super class is called. This method does not change actual parameters.
  953. Hence the new super class must have a constructor with the same signature
  954. as the original one.
  955. <p>
  956. This method should be called when the super class of the class declaring
  957. this method is changed.
  958. <p>
  959. This method does not perform anything unless this <code>MethodInfo</code>
  960. represents a constructor.</div>
  961. <dl>
  962. <dt><span class="paramLabel">Parameters:</span></dt>
  963. <dd><code>superclass</code> - the new super class</dd>
  964. <dt><span class="throwsLabel">Throws:</span></dt>
  965. <dd><code><a href="../../javassist/bytecode/BadBytecode.html" title="class in javassist.bytecode">BadBytecode</a></code></dd>
  966. </dl>
  967. </li>
  968. </ul>
  969. </li>
  970. </ul>
  971. </li>
  972. </ul>
  973. </div>
  974. </div>
  975. <!-- ========= END OF CLASS DATA ========= -->
  976. <!-- ======= START OF BOTTOM NAVBAR ====== -->
  977. <div class="bottomNav"><a name="navbar.bottom">
  978. <!-- -->
  979. </a>
  980. <div class="skipNav"><a href="#skip.navbar.bottom" title="Skip navigation links">Skip navigation links</a></div>
  981. <a name="navbar.bottom.firstrow">
  982. <!-- -->
  983. </a>
  984. <ul class="navList" title="Navigation">
  985. <li><a href="../../overview-summary.html">Overview</a></li>
  986. <li><a href="package-summary.html">Package</a></li>
  987. <li class="navBarCell1Rev">Class</li>
  988. <li><a href="class-use/MethodInfo.html">Use</a></li>
  989. <li><a href="package-tree.html">Tree</a></li>
  990. <li><a href="../../deprecated-list.html">Deprecated</a></li>
  991. <li><a href="../../index-all.html">Index</a></li>
  992. </ul>
  993. </div>
  994. <div class="subNav">
  995. <ul class="navList">
  996. <li><a href="../../javassist/bytecode/LocalVariableTypeAttribute.html" title="class in javassist.bytecode"><span class="typeNameLink">Prev&nbsp;Class</span></a></li>
  997. <li><a href="../../javassist/bytecode/MethodParametersAttribute.html" title="class in javassist.bytecode"><span class="typeNameLink">Next&nbsp;Class</span></a></li>
  998. </ul>
  999. <ul class="navList">
  1000. <li><a href="../../index.html?javassist/bytecode/MethodInfo.html" target="_top">Frames</a></li>
  1001. <li><a href="MethodInfo.html" target="_top">No&nbsp;Frames</a></li>
  1002. </ul>
  1003. <ul class="navList" id="allclasses_navbar_bottom">
  1004. <li><a href="../../allclasses-noframe.html">All&nbsp;Classes</a></li>
  1005. </ul>
  1006. <div>
  1007. <script type="text/javascript"><!--
  1008. allClassesLink = document.getElementById("allclasses_navbar_bottom");
  1009. if(window==top) {
  1010. allClassesLink.style.display = "block";
  1011. }
  1012. else {
  1013. allClassesLink.style.display = "none";
  1014. }
  1015. //-->
  1016. </script>
  1017. <noscript>
  1018. <div>JavaScript is disabled on your browser.</div>
  1019. </noscript>
  1020. </div>
  1021. <div>
  1022. <ul class="subNavList">
  1023. <li>Summary:&nbsp;</li>
  1024. <li>Nested&nbsp;|&nbsp;</li>
  1025. <li><a href="#field.summary">Field</a>&nbsp;|&nbsp;</li>
  1026. <li><a href="#constructor.summary">Constr</a>&nbsp;|&nbsp;</li>
  1027. <li><a href="#method.summary">Method</a></li>
  1028. </ul>
  1029. <ul class="subNavList">
  1030. <li>Detail:&nbsp;</li>
  1031. <li><a href="#field.detail">Field</a>&nbsp;|&nbsp;</li>
  1032. <li><a href="#constructor.detail">Constr</a>&nbsp;|&nbsp;</li>
  1033. <li><a href="#method.detail">Method</a></li>
  1034. </ul>
  1035. </div>
  1036. <a name="skip.navbar.bottom">
  1037. <!-- -->
  1038. </a></div>
  1039. <!-- ======== END OF BOTTOM NAVBAR ======= -->
  1040. <p class="legalCopy"><small><i>Javassist, a Java-bytecode translator toolkit.<br>
  1041. Copyright (C) 1999- Shigeru Chiba. All Rights Reserved.</i></small></p>
  1042. </body>
  1043. </html>