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.

CtClass.html 132KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564256525662567256825692570257125722573257425752576257725782579258025812582258325842585258625872588258925902591259225932594259525962597259825992600260126022603260426052606260726082609261026112612261326142615261626172618261926202621262226232624262526262627262826292630263126322633263426352636263726382639264026412642264326442645264626472648264926502651265226532654265526562657265826592660266126622663266426652666266726682669267026712672267326742675267626772678267926802681268226832684268526862687268826892690269126922693269426952696269726982699270027012702270327042705270627072708270927102711271227132714271527162717271827192720272127222723272427252726272727282729273027312732273327342735273627372738273927402741274227432744274527462747274827492750275127522753275427552756275727582759276027612762276327642765276627672768276927702771277227732774277527762777277827792780278127822783278427852786278727882789279027912792279327942795279627972798279928002801280228032804280528062807280828092810281128122813281428152816281728182819282028212822282328242825282628272828282928302831283228332834283528362837283828392840284128422843284428452846284728482849285028512852285328542855285628572858285928602861286228632864286528662867286828692870287128722873287428752876287728782879288028812882288328842885288628872888288928902891289228932894289528962897289828992900290129022903290429052906290729082909291029112912291329142915291629172918291929202921292229232924292529262927292829292930293129322933293429352936293729382939294029412942294329442945294629472948294929502951295229532954295529562957295829592960296129622963296429652966296729682969297029712972297329742975297629772978297929802981298229832984298529862987298829892990299129922993299429952996299729982999300030013002300330043005300630073008300930103011301230133014301530163017301830193020302130223023302430253026302730283029303030313032303330343035303630373038303930403041304230433044304530463047
  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>CtClass (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="CtClass (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,"i26":10,"i27":10,"i28":10,"i29":10,"i30":10,"i31":10,"i32":10,"i33":10,"i34":10,"i35":10,"i36":42,"i37":10,"i38":10,"i39":10,"i40":10,"i41":10,"i42":10,"i43":10,"i44":10,"i45":10,"i46":10,"i47":10,"i48":10,"i49":10,"i50":10,"i51":10,"i52":10,"i53":10,"i54":10,"i55":10,"i56":10,"i57":10,"i58":10,"i59":10,"i60":10,"i61":10,"i62":10,"i63":9,"i64":10,"i65":10,"i66":10,"i67":10,"i68":10,"i69":10,"i70":10,"i71":10,"i72":10,"i73":10,"i74":10,"i75":10,"i76":10,"i77":10,"i78":10,"i79":10,"i80":10,"i81":10,"i82":10,"i83":10,"i84":10,"i85":10,"i86":42,"i87":10,"i88":10,"i89":10,"i90":10};
  31. var tabs = {65535:["t0","All Methods"],1:["t1","Static Methods"],2:["t2","Instance Methods"],8:["t4","Concrete Methods"],32:["t6","Deprecated 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/CtClass.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/CtBehavior.html" title="class in javassist"><span class="typeNameLink">Prev&nbsp;Class</span></a></li>
  62. <li><a href="../javassist/CtConstructor.html" title="class in javassist"><span class="typeNameLink">Next&nbsp;Class</span></a></li>
  63. </ul>
  64. <ul class="navList">
  65. <li><a href="../index.html?javassist/CtClass.html" target="_top">Frames</a></li>
  66. <li><a href="CtClass.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>Constr&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>Constr&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/package-summary.html">javassist</a></div>
  120. <h2 title="Class CtClass" class="title">Class CtClass</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.CtClass</li>
  128. </ul>
  129. </li>
  130. </ul>
  131. <div class="description">
  132. <ul class="blockList">
  133. <li class="blockList">
  134. <dl>
  135. <dt>Direct Known Subclasses:</dt>
  136. <dd><code><a href="../javassist/CtPrimitiveType.html" title="class in javassist">CtPrimitiveType</a></code></dd>
  137. </dl>
  138. <hr>
  139. <pre>public abstract class <span class="typeNameLabel">CtClass</span>
  140. extends java.lang.Object</pre>
  141. <div class="block">An instance of <code>CtClass</code> represents a class.
  142. It is obtained from <code>ClassPool</code>.</div>
  143. <dl>
  144. <dt><span class="seeLabel">See Also:</span></dt>
  145. <dd><a href="../javassist/ClassPool.html#get-java.lang.String-"><code>ClassPool.get(String)</code></a></dd>
  146. </dl>
  147. </li>
  148. </ul>
  149. </div>
  150. <div class="summary">
  151. <ul class="blockList">
  152. <li class="blockList">
  153. <!-- =========== FIELD SUMMARY =========== -->
  154. <ul class="blockList">
  155. <li class="blockList"><a name="field.summary">
  156. <!-- -->
  157. </a>
  158. <h3>Field Summary</h3>
  159. <table class="memberSummary" summary="Field Summary table, listing fields, and an explanation">
  160. <caption><span>Fields</span><span class="tabEnd">&nbsp;</span></caption>
  161. <tr>
  162. <th class="colFirst" scope="col">Modifier and Type</th>
  163. <th class="colSecond" scope="col">Field</th>
  164. <th class="colLast" scope="col">Description</th>
  165. </tr>
  166. <tr class="altColor">
  167. <td class="colFirst"><code>static <a href="../javassist/CtClass.html" title="class in javassist">CtClass</a></code></td>
  168. <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="../javassist/CtClass.html#booleanType">booleanType</a></span></code></th>
  169. <td class="colLast">
  170. <div class="block">The <code>CtClass</code> object representing
  171. the <code>boolean</code> type.</div>
  172. </td>
  173. </tr>
  174. <tr class="rowColor">
  175. <td class="colFirst"><code>static <a href="../javassist/CtClass.html" title="class in javassist">CtClass</a></code></td>
  176. <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="../javassist/CtClass.html#byteType">byteType</a></span></code></th>
  177. <td class="colLast">
  178. <div class="block">The <code>CtClass</code> object representing
  179. the <code>byte</code> type.</div>
  180. </td>
  181. </tr>
  182. <tr class="altColor">
  183. <td class="colFirst"><code>static <a href="../javassist/CtClass.html" title="class in javassist">CtClass</a></code></td>
  184. <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="../javassist/CtClass.html#charType">charType</a></span></code></th>
  185. <td class="colLast">
  186. <div class="block">The <code>CtClass</code> object representing
  187. the <code>char</code> type.</div>
  188. </td>
  189. </tr>
  190. <tr class="rowColor">
  191. <td class="colFirst"><code>static java.lang.String</code></td>
  192. <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="../javassist/CtClass.html#debugDump">debugDump</a></span></code></th>
  193. <td class="colLast">
  194. <div class="block">If the value of this field is not null, then all class
  195. files modified by Javassist are saved under the directory
  196. specified by this variable.</div>
  197. </td>
  198. </tr>
  199. <tr class="altColor">
  200. <td class="colFirst"><code>static <a href="../javassist/CtClass.html" title="class in javassist">CtClass</a></code></td>
  201. <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="../javassist/CtClass.html#doubleType">doubleType</a></span></code></th>
  202. <td class="colLast">
  203. <div class="block">The <code>CtClass</code> object representing
  204. the <code>double</code> type.</div>
  205. </td>
  206. </tr>
  207. <tr class="rowColor">
  208. <td class="colFirst"><code>static <a href="../javassist/CtClass.html" title="class in javassist">CtClass</a></code></td>
  209. <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="../javassist/CtClass.html#floatType">floatType</a></span></code></th>
  210. <td class="colLast">
  211. <div class="block">The <code>CtClass</code> object representing
  212. the <code>float</code> type.</div>
  213. </td>
  214. </tr>
  215. <tr class="altColor">
  216. <td class="colFirst"><code>static <a href="../javassist/CtClass.html" title="class in javassist">CtClass</a></code></td>
  217. <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="../javassist/CtClass.html#intType">intType</a></span></code></th>
  218. <td class="colLast">
  219. <div class="block">The <code>CtClass</code> object representing
  220. the <code>int</code> type.</div>
  221. </td>
  222. </tr>
  223. <tr class="rowColor">
  224. <td class="colFirst"><code>static <a href="../javassist/CtClass.html" title="class in javassist">CtClass</a></code></td>
  225. <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="../javassist/CtClass.html#longType">longType</a></span></code></th>
  226. <td class="colLast">
  227. <div class="block">The <code>CtClass</code> object representing
  228. the <code>long</code> type.</div>
  229. </td>
  230. </tr>
  231. <tr class="altColor">
  232. <td class="colFirst"><code>static <a href="../javassist/CtClass.html" title="class in javassist">CtClass</a></code></td>
  233. <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="../javassist/CtClass.html#shortType">shortType</a></span></code></th>
  234. <td class="colLast">
  235. <div class="block">The <code>CtClass</code> object representing
  236. the <code>short</code> type.</div>
  237. </td>
  238. </tr>
  239. <tr class="rowColor">
  240. <td class="colFirst"><code>static java.lang.String</code></td>
  241. <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="../javassist/CtClass.html#version">version</a></span></code></th>
  242. <td class="colLast">
  243. <div class="block">The version number of this release.</div>
  244. </td>
  245. </tr>
  246. <tr class="altColor">
  247. <td class="colFirst"><code>static <a href="../javassist/CtClass.html" title="class in javassist">CtClass</a></code></td>
  248. <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="../javassist/CtClass.html#voidType">voidType</a></span></code></th>
  249. <td class="colLast">
  250. <div class="block">The <code>CtClass</code> object representing
  251. the <code>void</code> type.</div>
  252. </td>
  253. </tr>
  254. </table>
  255. </li>
  256. </ul>
  257. <!-- ========== METHOD SUMMARY =========== -->
  258. <ul class="blockList">
  259. <li class="blockList"><a name="method.summary">
  260. <!-- -->
  261. </a>
  262. <h3>Method Summary</h3>
  263. <table class="memberSummary" summary="Method Summary table, listing methods, and an explanation">
  264. <caption><span id="t0" class="activeTableTab"><span>All Methods</span><span class="tabEnd">&nbsp;</span></span><span id="t1" class="tableTab"><span><a href="javascript:show(1);">Static Methods</a></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><span id="t6" class="tableTab"><span><a href="javascript:show(32);">Deprecated Methods</a></span><span class="tabEnd">&nbsp;</span></span></caption>
  265. <tr>
  266. <th class="colFirst" scope="col">Modifier and Type</th>
  267. <th class="colSecond" scope="col">Method</th>
  268. <th class="colLast" scope="col">Description</th>
  269. </tr>
  270. <tr id="i0" class="altColor">
  271. <td class="colFirst"><code>void</code></td>
  272. <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="../javassist/CtClass.html#addConstructor-javassist.CtConstructor-">addConstructor</a></span>&#8203;(<a href="../javassist/CtConstructor.html" title="class in javassist">CtConstructor</a>&nbsp;c)</code></th>
  273. <td class="colLast">
  274. <div class="block">Adds a constructor.</div>
  275. </td>
  276. </tr>
  277. <tr id="i1" class="rowColor">
  278. <td class="colFirst"><code>void</code></td>
  279. <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="../javassist/CtClass.html#addField-javassist.CtField-">addField</a></span>&#8203;(<a href="../javassist/CtField.html" title="class in javassist">CtField</a>&nbsp;f)</code></th>
  280. <td class="colLast">
  281. <div class="block">Adds a field.</div>
  282. </td>
  283. </tr>
  284. <tr id="i2" class="altColor">
  285. <td class="colFirst"><code>void</code></td>
  286. <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="../javassist/CtClass.html#addField-javassist.CtField-java.lang.String-">addField</a></span>&#8203;(<a href="../javassist/CtField.html" title="class in javassist">CtField</a>&nbsp;f,
  287. java.lang.String&nbsp;init)</code></th>
  288. <td class="colLast">
  289. <div class="block">Adds a field with an initial value.</div>
  290. </td>
  291. </tr>
  292. <tr id="i3" class="rowColor">
  293. <td class="colFirst"><code>void</code></td>
  294. <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="../javassist/CtClass.html#addField-javassist.CtField-javassist.CtField.Initializer-">addField</a></span>&#8203;(<a href="../javassist/CtField.html" title="class in javassist">CtField</a>&nbsp;f,
  295. <a href="../javassist/CtField.Initializer.html" title="class in javassist">CtField.Initializer</a>&nbsp;init)</code></th>
  296. <td class="colLast">
  297. <div class="block">Adds a field with an initial value.</div>
  298. </td>
  299. </tr>
  300. <tr id="i4" class="altColor">
  301. <td class="colFirst"><code>void</code></td>
  302. <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="../javassist/CtClass.html#addInterface-javassist.CtClass-">addInterface</a></span>&#8203;(<a href="../javassist/CtClass.html" title="class in javassist">CtClass</a>&nbsp;anInterface)</code></th>
  303. <td class="colLast">
  304. <div class="block">Adds an interface.</div>
  305. </td>
  306. </tr>
  307. <tr id="i5" class="rowColor">
  308. <td class="colFirst"><code>void</code></td>
  309. <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="../javassist/CtClass.html#addMethod-javassist.CtMethod-">addMethod</a></span>&#8203;(<a href="../javassist/CtMethod.html" title="class in javassist">CtMethod</a>&nbsp;m)</code></th>
  310. <td class="colLast">
  311. <div class="block">Adds a method.</div>
  312. </td>
  313. </tr>
  314. <tr id="i6" class="altColor">
  315. <td class="colFirst"><code>void</code></td>
  316. <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="../javassist/CtClass.html#debugWriteFile--">debugWriteFile</a></span>()</code></th>
  317. <td class="colLast">
  318. <div class="block">Writes a class file as <code>writeFile()</code> does although this
  319. method does not prune or freeze the class after writing the class
  320. file.</div>
  321. </td>
  322. </tr>
  323. <tr id="i7" class="rowColor">
  324. <td class="colFirst"><code>void</code></td>
  325. <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="../javassist/CtClass.html#debugWriteFile-java.lang.String-">debugWriteFile</a></span>&#8203;(java.lang.String&nbsp;directoryName)</code></th>
  326. <td class="colLast">
  327. <div class="block">Writes a class file as <code>writeFile()</code> does although this
  328. method does not prune or freeze the class after writing the class
  329. file.</div>
  330. </td>
  331. </tr>
  332. <tr id="i8" class="altColor">
  333. <td class="colFirst"><code>void</code></td>
  334. <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="../javassist/CtClass.html#defrost--">defrost</a></span>()</code></th>
  335. <td class="colLast">
  336. <div class="block">Defrosts the class so that the class can be modified again.</div>
  337. </td>
  338. </tr>
  339. <tr id="i9" class="rowColor">
  340. <td class="colFirst"><code>void</code></td>
  341. <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="../javassist/CtClass.html#detach--">detach</a></span>()</code></th>
  342. <td class="colLast">
  343. <div class="block">Removes this <code>CtClass</code> object from the
  344. <code>ClassPool</code>.</div>
  345. </td>
  346. </tr>
  347. <tr id="i10" class="altColor">
  348. <td class="colFirst"><code>void</code></td>
  349. <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="../javassist/CtClass.html#freeze--">freeze</a></span>()</code></th>
  350. <td class="colLast">
  351. <div class="block">Makes the class frozen.</div>
  352. </td>
  353. </tr>
  354. <tr id="i11" class="rowColor">
  355. <td class="colFirst"><code>javassist.compiler.AccessorMaker</code></td>
  356. <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="../javassist/CtClass.html#getAccessorMaker--">getAccessorMaker</a></span>()</code></th>
  357. <td class="colLast">
  358. <div class="block">Undocumented method.</div>
  359. </td>
  360. </tr>
  361. <tr id="i12" class="altColor">
  362. <td class="colFirst"><code>java.lang.Object</code></td>
  363. <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="../javassist/CtClass.html#getAnnotation-java.lang.Class-">getAnnotation</a></span>&#8203;(java.lang.Class&lt;?&gt;&nbsp;clz)</code></th>
  364. <td class="colLast">
  365. <div class="block">Returns the annotation if the class has the specified annotation type.</div>
  366. </td>
  367. </tr>
  368. <tr id="i13" class="rowColor">
  369. <td class="colFirst"><code>java.lang.Object[]</code></td>
  370. <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="../javassist/CtClass.html#getAnnotations--">getAnnotations</a></span>()</code></th>
  371. <td class="colLast">
  372. <div class="block">Returns the annotations associated with this class.</div>
  373. </td>
  374. </tr>
  375. <tr id="i14" class="altColor">
  376. <td class="colFirst"><code>byte[]</code></td>
  377. <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="../javassist/CtClass.html#getAttribute-java.lang.String-">getAttribute</a></span>&#8203;(java.lang.String&nbsp;name)</code></th>
  378. <td class="colLast">
  379. <div class="block">Obtains an attribute with the given name.</div>
  380. </td>
  381. </tr>
  382. <tr id="i15" class="rowColor">
  383. <td class="colFirst"><code>java.lang.Object[]</code></td>
  384. <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="../javassist/CtClass.html#getAvailableAnnotations--">getAvailableAnnotations</a></span>()</code></th>
  385. <td class="colLast">
  386. <div class="block">Returns the annotations associated with this class.</div>
  387. </td>
  388. </tr>
  389. <tr id="i16" class="altColor">
  390. <td class="colFirst"><code><a href="../javassist/bytecode/ClassFile.html" title="class in javassist.bytecode">ClassFile</a></code></td>
  391. <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="../javassist/CtClass.html#getClassFile--">getClassFile</a></span>()</code></th>
  392. <td class="colLast">
  393. <div class="block">Returns a class file for this class.</div>
  394. </td>
  395. </tr>
  396. <tr id="i17" class="rowColor">
  397. <td class="colFirst"><code><a href="../javassist/bytecode/ClassFile.html" title="class in javassist.bytecode">ClassFile</a></code></td>
  398. <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="../javassist/CtClass.html#getClassFile2--">getClassFile2</a></span>()</code></th>
  399. <td class="colLast">
  400. <div class="block">Returns a class file for this class (read only).</div>
  401. </td>
  402. </tr>
  403. <tr id="i18" class="altColor">
  404. <td class="colFirst"><code><a href="../javassist/CtConstructor.html" title="class in javassist">CtConstructor</a></code></td>
  405. <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="../javassist/CtClass.html#getClassInitializer--">getClassInitializer</a></span>()</code></th>
  406. <td class="colLast">
  407. <div class="block">Gets the class initializer (static constructor)
  408. declared in the class.</div>
  409. </td>
  410. </tr>
  411. <tr id="i19" class="rowColor">
  412. <td class="colFirst"><code><a href="../javassist/ClassPool.html" title="class in javassist">ClassPool</a></code></td>
  413. <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="../javassist/CtClass.html#getClassPool--">getClassPool</a></span>()</code></th>
  414. <td class="colLast">
  415. <div class="block">Returns a <code>ClassPool</code> for this class.</div>
  416. </td>
  417. </tr>
  418. <tr id="i20" class="altColor">
  419. <td class="colFirst"><code><a href="../javassist/CtClass.html" title="class in javassist">CtClass</a></code></td>
  420. <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="../javassist/CtClass.html#getComponentType--">getComponentType</a></span>()</code></th>
  421. <td class="colLast">
  422. <div class="block">If this object represents an array, this method returns the component
  423. type of the array.</div>
  424. </td>
  425. </tr>
  426. <tr id="i21" class="rowColor">
  427. <td class="colFirst"><code><a href="../javassist/CtConstructor.html" title="class in javassist">CtConstructor</a></code></td>
  428. <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="../javassist/CtClass.html#getConstructor-java.lang.String-">getConstructor</a></span>&#8203;(java.lang.String&nbsp;desc)</code></th>
  429. <td class="colLast">
  430. <div class="block">Returns the constructor with the given signature,
  431. which is represented by a character string
  432. called method descriptor.</div>
  433. </td>
  434. </tr>
  435. <tr id="i22" class="altColor">
  436. <td class="colFirst"><code><a href="../javassist/CtConstructor.html" title="class in javassist">CtConstructor</a>[]</code></td>
  437. <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="../javassist/CtClass.html#getConstructors--">getConstructors</a></span>()</code></th>
  438. <td class="colLast">
  439. <div class="block">Returns an array containing <code>CtConstructor</code> objects
  440. representing all the non-private constructors of the class.</div>
  441. </td>
  442. </tr>
  443. <tr id="i23" class="rowColor">
  444. <td class="colFirst"><code><a href="../javassist/CtBehavior.html" title="class in javassist">CtBehavior</a>[]</code></td>
  445. <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="../javassist/CtClass.html#getDeclaredBehaviors--">getDeclaredBehaviors</a></span>()</code></th>
  446. <td class="colLast">
  447. <div class="block">Gets all the constructors and methods declared in the class.</div>
  448. </td>
  449. </tr>
  450. <tr id="i24" class="altColor">
  451. <td class="colFirst"><code><a href="../javassist/CtClass.html" title="class in javassist">CtClass</a>[]</code></td>
  452. <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="../javassist/CtClass.html#getDeclaredClasses--">getDeclaredClasses</a></span>()</code></th>
  453. <td class="colLast">
  454. <div class="block">Returns an array of nested classes declared in the class.</div>
  455. </td>
  456. </tr>
  457. <tr id="i25" class="rowColor">
  458. <td class="colFirst"><code><a href="../javassist/CtConstructor.html" title="class in javassist">CtConstructor</a></code></td>
  459. <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="../javassist/CtClass.html#getDeclaredConstructor-javassist.CtClass:A-">getDeclaredConstructor</a></span>&#8203;(<a href="../javassist/CtClass.html" title="class in javassist">CtClass</a>[]&nbsp;params)</code></th>
  460. <td class="colLast">
  461. <div class="block">Returns a constructor receiving the specified parameters.</div>
  462. </td>
  463. </tr>
  464. <tr id="i26" class="altColor">
  465. <td class="colFirst"><code><a href="../javassist/CtConstructor.html" title="class in javassist">CtConstructor</a>[]</code></td>
  466. <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="../javassist/CtClass.html#getDeclaredConstructors--">getDeclaredConstructors</a></span>()</code></th>
  467. <td class="colLast">
  468. <div class="block">Gets all the constructors declared in the class.</div>
  469. </td>
  470. </tr>
  471. <tr id="i27" class="rowColor">
  472. <td class="colFirst"><code><a href="../javassist/CtField.html" title="class in javassist">CtField</a></code></td>
  473. <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="../javassist/CtClass.html#getDeclaredField-java.lang.String-">getDeclaredField</a></span>&#8203;(java.lang.String&nbsp;name)</code></th>
  474. <td class="colLast">
  475. <div class="block">Retrieves the field with the specified name among the fields
  476. declared in the class.</div>
  477. </td>
  478. </tr>
  479. <tr id="i28" class="altColor">
  480. <td class="colFirst"><code><a href="../javassist/CtField.html" title="class in javassist">CtField</a></code></td>
  481. <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="../javassist/CtClass.html#getDeclaredField-java.lang.String-java.lang.String-">getDeclaredField</a></span>&#8203;(java.lang.String&nbsp;name,
  482. java.lang.String&nbsp;desc)</code></th>
  483. <td class="colLast">
  484. <div class="block">Retrieves the field with the specified name and type among the fields
  485. declared in the class.</div>
  486. </td>
  487. </tr>
  488. <tr id="i29" class="rowColor">
  489. <td class="colFirst"><code><a href="../javassist/CtField.html" title="class in javassist">CtField</a>[]</code></td>
  490. <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="../javassist/CtClass.html#getDeclaredFields--">getDeclaredFields</a></span>()</code></th>
  491. <td class="colLast">
  492. <div class="block">Gets all the fields declared in the class.</div>
  493. </td>
  494. </tr>
  495. <tr id="i30" class="altColor">
  496. <td class="colFirst"><code><a href="../javassist/CtMethod.html" title="class in javassist">CtMethod</a></code></td>
  497. <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="../javassist/CtClass.html#getDeclaredMethod-java.lang.String-">getDeclaredMethod</a></span>&#8203;(java.lang.String&nbsp;name)</code></th>
  498. <td class="colLast">
  499. <div class="block">Retrieves the method with the specified name among the methods
  500. declared in the class.</div>
  501. </td>
  502. </tr>
  503. <tr id="i31" class="rowColor">
  504. <td class="colFirst"><code><a href="../javassist/CtMethod.html" title="class in javassist">CtMethod</a></code></td>
  505. <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="../javassist/CtClass.html#getDeclaredMethod-java.lang.String-javassist.CtClass:A-">getDeclaredMethod</a></span>&#8203;(java.lang.String&nbsp;name,
  506. <a href="../javassist/CtClass.html" title="class in javassist">CtClass</a>[]&nbsp;params)</code></th>
  507. <td class="colLast">
  508. <div class="block">Retrieves the method with the specified name and parameter types
  509. among the methods declared in the class.</div>
  510. </td>
  511. </tr>
  512. <tr id="i32" class="altColor">
  513. <td class="colFirst"><code><a href="../javassist/CtMethod.html" title="class in javassist">CtMethod</a>[]</code></td>
  514. <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="../javassist/CtClass.html#getDeclaredMethods--">getDeclaredMethods</a></span>()</code></th>
  515. <td class="colLast">
  516. <div class="block">Gets all methods declared in the class.</div>
  517. </td>
  518. </tr>
  519. <tr id="i33" class="rowColor">
  520. <td class="colFirst"><code><a href="../javassist/CtMethod.html" title="class in javassist">CtMethod</a>[]</code></td>
  521. <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="../javassist/CtClass.html#getDeclaredMethods-java.lang.String-">getDeclaredMethods</a></span>&#8203;(java.lang.String&nbsp;name)</code></th>
  522. <td class="colLast">
  523. <div class="block">Retrieves methods with the specified name among the methods
  524. declared in the class.</div>
  525. </td>
  526. </tr>
  527. <tr id="i34" class="altColor">
  528. <td class="colFirst"><code><a href="../javassist/CtClass.html" title="class in javassist">CtClass</a></code></td>
  529. <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="../javassist/CtClass.html#getDeclaringClass--">getDeclaringClass</a></span>()</code></th>
  530. <td class="colLast">
  531. <div class="block">If this class is a member class or interface of another class,
  532. then the class enclosing this class is returned.</div>
  533. </td>
  534. </tr>
  535. <tr id="i35" class="rowColor">
  536. <td class="colFirst"><code><a href="../javassist/CtBehavior.html" title="class in javassist">CtBehavior</a></code></td>
  537. <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="../javassist/CtClass.html#getEnclosingBehavior--">getEnclosingBehavior</a></span>()</code></th>
  538. <td class="colLast">
  539. <div class="block">Returns the immediately enclosing method of this class.</div>
  540. </td>
  541. </tr>
  542. <tr id="i36" class="altColor">
  543. <td class="colFirst"><code><a href="../javassist/CtMethod.html" title="class in javassist">CtMethod</a></code></td>
  544. <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="../javassist/CtClass.html#getEnclosingMethod--">getEnclosingMethod</a></span>()</code></th>
  545. <td class="colLast">
  546. <div class="block"><span class="deprecatedLabel">Deprecated.</span>
  547. <div class="deprecationComment">The enclosing method might be a constructor.</div>
  548. </div>
  549. </td>
  550. </tr>
  551. <tr id="i37" class="rowColor">
  552. <td class="colFirst"><code><a href="../javassist/CtField.html" title="class in javassist">CtField</a></code></td>
  553. <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="../javassist/CtClass.html#getField-java.lang.String-">getField</a></span>&#8203;(java.lang.String&nbsp;name)</code></th>
  554. <td class="colLast">
  555. <div class="block">Returns the field with the specified name.</div>
  556. </td>
  557. </tr>
  558. <tr id="i38" class="altColor">
  559. <td class="colFirst"><code><a href="../javassist/CtField.html" title="class in javassist">CtField</a></code></td>
  560. <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="../javassist/CtClass.html#getField-java.lang.String-java.lang.String-">getField</a></span>&#8203;(java.lang.String&nbsp;name,
  561. java.lang.String&nbsp;desc)</code></th>
  562. <td class="colLast">
  563. <div class="block">Returns the field with the specified name and type.</div>
  564. </td>
  565. </tr>
  566. <tr id="i39" class="rowColor">
  567. <td class="colFirst"><code><a href="../javassist/CtField.html" title="class in javassist">CtField</a>[]</code></td>
  568. <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="../javassist/CtClass.html#getFields--">getFields</a></span>()</code></th>
  569. <td class="colLast">
  570. <div class="block">Returns an array containing <code>CtField</code> objects
  571. representing all the non-private fields of the class.</div>
  572. </td>
  573. </tr>
  574. <tr id="i40" class="altColor">
  575. <td class="colFirst"><code>java.lang.String</code></td>
  576. <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="../javassist/CtClass.html#getGenericSignature--">getGenericSignature</a></span>()</code></th>
  577. <td class="colLast">
  578. <div class="block">Returns the generic signature of the class.</div>
  579. </td>
  580. </tr>
  581. <tr id="i41" class="rowColor">
  582. <td class="colFirst"><code><a href="../javassist/CtClass.html" title="class in javassist">CtClass</a>[]</code></td>
  583. <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="../javassist/CtClass.html#getInterfaces--">getInterfaces</a></span>()</code></th>
  584. <td class="colLast">
  585. <div class="block">Obtains the class objects representing the interfaces implemented
  586. by the class or, if this object represents an interface, the interfaces
  587. extended by that interface.</div>
  588. </td>
  589. </tr>
  590. <tr id="i42" class="altColor">
  591. <td class="colFirst"><code><a href="../javassist/CtMethod.html" title="class in javassist">CtMethod</a></code></td>
  592. <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="../javassist/CtClass.html#getMethod-java.lang.String-java.lang.String-">getMethod</a></span>&#8203;(java.lang.String&nbsp;name,
  593. java.lang.String&nbsp;desc)</code></th>
  594. <td class="colLast">
  595. <div class="block">Returns the method with the given name and signature.</div>
  596. </td>
  597. </tr>
  598. <tr id="i43" class="rowColor">
  599. <td class="colFirst"><code><a href="../javassist/CtMethod.html" title="class in javassist">CtMethod</a>[]</code></td>
  600. <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="../javassist/CtClass.html#getMethods--">getMethods</a></span>()</code></th>
  601. <td class="colLast">
  602. <div class="block">Returns an array containing <code>CtMethod</code> objects
  603. representing all the non-private methods of the class.</div>
  604. </td>
  605. </tr>
  606. <tr id="i44" class="altColor">
  607. <td class="colFirst"><code>int</code></td>
  608. <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="../javassist/CtClass.html#getModifiers--">getModifiers</a></span>()</code></th>
  609. <td class="colLast">
  610. <div class="block">Returns the modifiers for this class, encoded in an integer.</div>
  611. </td>
  612. </tr>
  613. <tr id="i45" class="rowColor">
  614. <td class="colFirst"><code>java.lang.String</code></td>
  615. <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="../javassist/CtClass.html#getName--">getName</a></span>()</code></th>
  616. <td class="colLast">
  617. <div class="block">Obtains the fully-qualified name of the class.</div>
  618. </td>
  619. </tr>
  620. <tr id="i46" class="altColor">
  621. <td class="colFirst"><code><a href="../javassist/CtClass.html" title="class in javassist">CtClass</a>[]</code></td>
  622. <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="../javassist/CtClass.html#getNestedClasses--">getNestedClasses</a></span>()</code></th>
  623. <td class="colLast">
  624. <div class="block">Returns an array of nested classes declared in the class.</div>
  625. </td>
  626. </tr>
  627. <tr id="i47" class="rowColor">
  628. <td class="colFirst"><code>java.lang.String</code></td>
  629. <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="../javassist/CtClass.html#getPackageName--">getPackageName</a></span>()</code></th>
  630. <td class="colLast">
  631. <div class="block">Obtains the package name.</div>
  632. </td>
  633. </tr>
  634. <tr id="i48" class="altColor">
  635. <td class="colFirst"><code>java.util.Collection&lt;java.lang.String&gt;</code></td>
  636. <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="../javassist/CtClass.html#getRefClasses--">getRefClasses</a></span>()</code></th>
  637. <td class="colLast">
  638. <div class="block">Returns a collection of the names of all the classes
  639. referenced in this class.</div>
  640. </td>
  641. </tr>
  642. <tr id="i49" class="rowColor">
  643. <td class="colFirst"><code>java.lang.String</code></td>
  644. <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="../javassist/CtClass.html#getSimpleName--">getSimpleName</a></span>()</code></th>
  645. <td class="colLast">
  646. <div class="block">Obtains the not-qualified class name.</div>
  647. </td>
  648. </tr>
  649. <tr id="i50" class="altColor">
  650. <td class="colFirst"><code><a href="../javassist/CtClass.html" title="class in javassist">CtClass</a></code></td>
  651. <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="../javassist/CtClass.html#getSuperclass--">getSuperclass</a></span>()</code></th>
  652. <td class="colLast">
  653. <div class="block">Obtains the class object representing the superclass of the
  654. class.</div>
  655. </td>
  656. </tr>
  657. <tr id="i51" class="rowColor">
  658. <td class="colFirst"><code>java.net.URL</code></td>
  659. <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="../javassist/CtClass.html#getURL--">getURL</a></span>()</code></th>
  660. <td class="colLast">
  661. <div class="block">Returns the uniform resource locator (URL) of the class file.</div>
  662. </td>
  663. </tr>
  664. <tr id="i52" class="altColor">
  665. <td class="colFirst"><code>boolean</code></td>
  666. <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="../javassist/CtClass.html#hasAnnotation-java.lang.Class-">hasAnnotation</a></span>&#8203;(java.lang.Class&lt;?&gt;&nbsp;annotationType)</code></th>
  667. <td class="colLast">
  668. <div class="block">Returns true if the class has the specified annotation type.</div>
  669. </td>
  670. </tr>
  671. <tr id="i53" class="rowColor">
  672. <td class="colFirst"><code>boolean</code></td>
  673. <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="../javassist/CtClass.html#hasAnnotation-java.lang.String-">hasAnnotation</a></span>&#8203;(java.lang.String&nbsp;annotationTypeName)</code></th>
  674. <td class="colLast">
  675. <div class="block">Returns true if the class has the specified annotation type.</div>
  676. </td>
  677. </tr>
  678. <tr id="i54" class="altColor">
  679. <td class="colFirst"><code>void</code></td>
  680. <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="../javassist/CtClass.html#instrument-javassist.CodeConverter-">instrument</a></span>&#8203;(<a href="../javassist/CodeConverter.html" title="class in javassist">CodeConverter</a>&nbsp;converter)</code></th>
  681. <td class="colLast">
  682. <div class="block">Applies the given converter to all methods and constructors
  683. declared in the class.</div>
  684. </td>
  685. </tr>
  686. <tr id="i55" class="rowColor">
  687. <td class="colFirst"><code>void</code></td>
  688. <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="../javassist/CtClass.html#instrument-javassist.expr.ExprEditor-">instrument</a></span>&#8203;(<a href="../javassist/expr/ExprEditor.html" title="class in javassist.expr">ExprEditor</a>&nbsp;editor)</code></th>
  689. <td class="colLast">
  690. <div class="block">Modifies the bodies of all methods and constructors
  691. declared in the class.</div>
  692. </td>
  693. </tr>
  694. <tr id="i56" class="altColor">
  695. <td class="colFirst"><code>boolean</code></td>
  696. <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="../javassist/CtClass.html#isAnnotation--">isAnnotation</a></span>()</code></th>
  697. <td class="colLast">
  698. <div class="block">Determines whether this object represents an annotation type.</div>
  699. </td>
  700. </tr>
  701. <tr id="i57" class="rowColor">
  702. <td class="colFirst"><code>boolean</code></td>
  703. <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="../javassist/CtClass.html#isArray--">isArray</a></span>()</code></th>
  704. <td class="colLast">
  705. <div class="block">Returns <code>true</code> if this object represents an array type.</div>
  706. </td>
  707. </tr>
  708. <tr id="i58" class="altColor">
  709. <td class="colFirst"><code>boolean</code></td>
  710. <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="../javassist/CtClass.html#isEnum--">isEnum</a></span>()</code></th>
  711. <td class="colLast">
  712. <div class="block">Determines whether this object represents an enum.</div>
  713. </td>
  714. </tr>
  715. <tr id="i59" class="rowColor">
  716. <td class="colFirst"><code>boolean</code></td>
  717. <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="../javassist/CtClass.html#isFrozen--">isFrozen</a></span>()</code></th>
  718. <td class="colLast">
  719. <div class="block">Returns true if the class has been loaded or written out
  720. and thus it cannot be modified any more.</div>
  721. </td>
  722. </tr>
  723. <tr id="i60" class="altColor">
  724. <td class="colFirst"><code>boolean</code></td>
  725. <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="../javassist/CtClass.html#isInterface--">isInterface</a></span>()</code></th>
  726. <td class="colLast">
  727. <div class="block">Determines whether this object represents a class or an interface.</div>
  728. </td>
  729. </tr>
  730. <tr id="i61" class="rowColor">
  731. <td class="colFirst"><code>boolean</code></td>
  732. <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="../javassist/CtClass.html#isModified--">isModified</a></span>()</code></th>
  733. <td class="colLast">
  734. <div class="block">Returns true if the definition of the class has been modified.</div>
  735. </td>
  736. </tr>
  737. <tr id="i62" class="altColor">
  738. <td class="colFirst"><code>boolean</code></td>
  739. <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="../javassist/CtClass.html#isPrimitive--">isPrimitive</a></span>()</code></th>
  740. <td class="colLast">
  741. <div class="block">Returns <code>true</code> if this object represents a primitive
  742. Java type: boolean, byte, char, short, int, long, float, double,
  743. or void.</div>
  744. </td>
  745. </tr>
  746. <tr id="i63" class="rowColor">
  747. <td class="colFirst"><code>static void</code></td>
  748. <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="../javassist/CtClass.html#main-java.lang.String:A-">main</a></span>&#8203;(java.lang.String[]&nbsp;args)</code></th>
  749. <td class="colLast">
  750. <div class="block">Prints the version number and the copyright notice.</div>
  751. </td>
  752. </tr>
  753. <tr id="i64" class="altColor">
  754. <td class="colFirst"><code><a href="../javassist/CtConstructor.html" title="class in javassist">CtConstructor</a></code></td>
  755. <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="../javassist/CtClass.html#makeClassInitializer--">makeClassInitializer</a></span>()</code></th>
  756. <td class="colLast">
  757. <div class="block">Makes an empty class initializer (static constructor).</div>
  758. </td>
  759. </tr>
  760. <tr id="i65" class="rowColor">
  761. <td class="colFirst"><code><a href="../javassist/CtClass.html" title="class in javassist">CtClass</a></code></td>
  762. <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="../javassist/CtClass.html#makeNestedClass-java.lang.String-boolean-">makeNestedClass</a></span>&#8203;(java.lang.String&nbsp;name,
  763. boolean&nbsp;isStatic)</code></th>
  764. <td class="colLast">
  765. <div class="block">Makes a new public nested class.</div>
  766. </td>
  767. </tr>
  768. <tr id="i66" class="altColor">
  769. <td class="colFirst"><code>java.lang.String</code></td>
  770. <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="../javassist/CtClass.html#makeUniqueName-java.lang.String-">makeUniqueName</a></span>&#8203;(java.lang.String&nbsp;prefix)</code></th>
  771. <td class="colLast">
  772. <div class="block">Makes a unique member name.</div>
  773. </td>
  774. </tr>
  775. <tr id="i67" class="rowColor">
  776. <td class="colFirst"><code>void</code></td>
  777. <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="../javassist/CtClass.html#prune--">prune</a></span>()</code></th>
  778. <td class="colLast">
  779. <div class="block">Discards unnecessary attributes, in particular,
  780. <code>CodeAttribute</code>s (method bodies) of the class,
  781. to minimize the memory footprint.</div>
  782. </td>
  783. </tr>
  784. <tr id="i68" class="altColor">
  785. <td class="colFirst"><code>void</code></td>
  786. <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="../javassist/CtClass.html#rebuildClassFile--">rebuildClassFile</a></span>()</code></th>
  787. <td class="colLast">
  788. <div class="block">If this method is called, the class file will be
  789. rebuilt when it is finally generated by
  790. <code>toBytecode()</code> and <code>writeFile()</code>.</div>
  791. </td>
  792. </tr>
  793. <tr id="i69" class="rowColor">
  794. <td class="colFirst"><code>void</code></td>
  795. <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="../javassist/CtClass.html#removeConstructor-javassist.CtConstructor-">removeConstructor</a></span>&#8203;(<a href="../javassist/CtConstructor.html" title="class in javassist">CtConstructor</a>&nbsp;c)</code></th>
  796. <td class="colLast">
  797. <div class="block">Removes a constructor declared in this class.</div>
  798. </td>
  799. </tr>
  800. <tr id="i70" class="altColor">
  801. <td class="colFirst"><code>void</code></td>
  802. <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="../javassist/CtClass.html#removeField-javassist.CtField-">removeField</a></span>&#8203;(<a href="../javassist/CtField.html" title="class in javassist">CtField</a>&nbsp;f)</code></th>
  803. <td class="colLast">
  804. <div class="block">Removes a field declared in this class.</div>
  805. </td>
  806. </tr>
  807. <tr id="i71" class="rowColor">
  808. <td class="colFirst"><code>void</code></td>
  809. <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="../javassist/CtClass.html#removeMethod-javassist.CtMethod-">removeMethod</a></span>&#8203;(<a href="../javassist/CtMethod.html" title="class in javassist">CtMethod</a>&nbsp;m)</code></th>
  810. <td class="colLast">
  811. <div class="block">Removes a method declared in this class.</div>
  812. </td>
  813. </tr>
  814. <tr id="i72" class="altColor">
  815. <td class="colFirst"><code>void</code></td>
  816. <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="../javassist/CtClass.html#replaceClassName-java.lang.String-java.lang.String-">replaceClassName</a></span>&#8203;(java.lang.String&nbsp;oldName,
  817. java.lang.String&nbsp;newName)</code></th>
  818. <td class="colLast">
  819. <div class="block">Substitutes <code>newName</code> for all occurrences of a class
  820. name <code>oldName</code> in the class file.</div>
  821. </td>
  822. </tr>
  823. <tr id="i73" class="rowColor">
  824. <td class="colFirst"><code>void</code></td>
  825. <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="../javassist/CtClass.html#replaceClassName-javassist.ClassMap-">replaceClassName</a></span>&#8203;(<a href="../javassist/ClassMap.html" title="class in javassist">ClassMap</a>&nbsp;map)</code></th>
  826. <td class="colLast">
  827. <div class="block">Changes class names appearing in the class file according to the
  828. given <code>map</code>.</div>
  829. </td>
  830. </tr>
  831. <tr id="i74" class="altColor">
  832. <td class="colFirst"><code>void</code></td>
  833. <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="../javassist/CtClass.html#setAttribute-java.lang.String-byte:A-">setAttribute</a></span>&#8203;(java.lang.String&nbsp;name,
  834. byte[]&nbsp;data)</code></th>
  835. <td class="colLast">
  836. <div class="block">Adds a named attribute.</div>
  837. </td>
  838. </tr>
  839. <tr id="i75" class="rowColor">
  840. <td class="colFirst"><code>void</code></td>
  841. <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="../javassist/CtClass.html#setGenericSignature-java.lang.String-">setGenericSignature</a></span>&#8203;(java.lang.String&nbsp;sig)</code></th>
  842. <td class="colLast">
  843. <div class="block">Sets the generic signature of the class.</div>
  844. </td>
  845. </tr>
  846. <tr id="i76" class="altColor">
  847. <td class="colFirst"><code>void</code></td>
  848. <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="../javassist/CtClass.html#setInterfaces-javassist.CtClass:A-">setInterfaces</a></span>&#8203;(<a href="../javassist/CtClass.html" title="class in javassist">CtClass</a>[]&nbsp;list)</code></th>
  849. <td class="colLast">
  850. <div class="block">Sets implemented interfaces.</div>
  851. </td>
  852. </tr>
  853. <tr id="i77" class="rowColor">
  854. <td class="colFirst"><code>void</code></td>
  855. <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="../javassist/CtClass.html#setModifiers-int-">setModifiers</a></span>&#8203;(int&nbsp;mod)</code></th>
  856. <td class="colLast">
  857. <div class="block">Sets the modifiers.</div>
  858. </td>
  859. </tr>
  860. <tr id="i78" class="altColor">
  861. <td class="colFirst"><code>void</code></td>
  862. <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="../javassist/CtClass.html#setName-java.lang.String-">setName</a></span>&#8203;(java.lang.String&nbsp;name)</code></th>
  863. <td class="colLast">
  864. <div class="block">Sets the class name</div>
  865. </td>
  866. </tr>
  867. <tr id="i79" class="rowColor">
  868. <td class="colFirst"><code>void</code></td>
  869. <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="../javassist/CtClass.html#setSuperclass-javassist.CtClass-">setSuperclass</a></span>&#8203;(<a href="../javassist/CtClass.html" title="class in javassist">CtClass</a>&nbsp;clazz)</code></th>
  870. <td class="colLast">
  871. <div class="block">Changes a super class unless this object represents an interface.</div>
  872. </td>
  873. </tr>
  874. <tr id="i80" class="altColor">
  875. <td class="colFirst"><code>boolean</code></td>
  876. <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="../javassist/CtClass.html#stopPruning-boolean-">stopPruning</a></span>&#8203;(boolean&nbsp;stop)</code></th>
  877. <td class="colLast">
  878. <div class="block">Disallows (or allows) automatically pruning this <code>CtClass</code>
  879. object.</div>
  880. </td>
  881. </tr>
  882. <tr id="i81" class="rowColor">
  883. <td class="colFirst"><code>boolean</code></td>
  884. <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="../javassist/CtClass.html#subclassOf-javassist.CtClass-">subclassOf</a></span>&#8203;(<a href="../javassist/CtClass.html" title="class in javassist">CtClass</a>&nbsp;superclass)</code></th>
  885. <td class="colLast">
  886. <div class="block">Determines whether the class directly or indirectly extends
  887. the given class.</div>
  888. </td>
  889. </tr>
  890. <tr id="i82" class="altColor">
  891. <td class="colFirst"><code>boolean</code></td>
  892. <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="../javassist/CtClass.html#subtypeOf-javassist.CtClass-">subtypeOf</a></span>&#8203;(<a href="../javassist/CtClass.html" title="class in javassist">CtClass</a>&nbsp;clazz)</code></th>
  893. <td class="colLast">
  894. <div class="block">Returns <code>true</code> if this class extends or implements
  895. <code>clazz</code>.</div>
  896. </td>
  897. </tr>
  898. <tr id="i83" class="rowColor">
  899. <td class="colFirst"><code>byte[]</code></td>
  900. <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="../javassist/CtClass.html#toBytecode--">toBytecode</a></span>()</code></th>
  901. <td class="colLast">
  902. <div class="block">Converts this class to a class file.</div>
  903. </td>
  904. </tr>
  905. <tr id="i84" class="altColor">
  906. <td class="colFirst"><code>void</code></td>
  907. <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="../javassist/CtClass.html#toBytecode-java.io.DataOutputStream-">toBytecode</a></span>&#8203;(java.io.DataOutputStream&nbsp;out)</code></th>
  908. <td class="colLast">
  909. <div class="block">Converts this class to a class file.</div>
  910. </td>
  911. </tr>
  912. <tr id="i85" class="rowColor">
  913. <td class="colFirst"><code>java.lang.Class&lt;?&gt;</code></td>
  914. <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="../javassist/CtClass.html#toClass--">toClass</a></span>()</code></th>
  915. <td class="colLast">
  916. <div class="block">Converts this class to a <code>java.lang.Class</code> object.</div>
  917. </td>
  918. </tr>
  919. <tr id="i86" class="altColor">
  920. <td class="colFirst"><code>java.lang.Class&lt;?&gt;</code></td>
  921. <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="../javassist/CtClass.html#toClass-java.lang.ClassLoader-">toClass</a></span>&#8203;(java.lang.ClassLoader&nbsp;loader)</code></th>
  922. <td class="colLast">
  923. <div class="block"><span class="deprecatedLabel">Deprecated.</span>
  924. <div class="deprecationComment">Replaced by <a href="../javassist/CtClass.html#toClass-java.lang.ClassLoader-java.security.ProtectionDomain-"><code>toClass(ClassLoader,ProtectionDomain)</code></a></div>
  925. </div>
  926. </td>
  927. </tr>
  928. <tr id="i87" class="rowColor">
  929. <td class="colFirst"><code>java.lang.Class&lt;?&gt;</code></td>
  930. <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="../javassist/CtClass.html#toClass-java.lang.ClassLoader-java.security.ProtectionDomain-">toClass</a></span>&#8203;(java.lang.ClassLoader&nbsp;loader,
  931. java.security.ProtectionDomain&nbsp;domain)</code></th>
  932. <td class="colLast">
  933. <div class="block">Converts this class to a <code>java.lang.Class</code> object.</div>
  934. </td>
  935. </tr>
  936. <tr id="i88" class="altColor">
  937. <td class="colFirst"><code>java.lang.String</code></td>
  938. <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="../javassist/CtClass.html#toString--">toString</a></span>()</code></th>
  939. <td class="colLast">
  940. <div class="block">Converts the object to a string.</div>
  941. </td>
  942. </tr>
  943. <tr id="i89" class="rowColor">
  944. <td class="colFirst"><code>void</code></td>
  945. <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="../javassist/CtClass.html#writeFile--">writeFile</a></span>()</code></th>
  946. <td class="colLast">
  947. <div class="block">Writes a class file represented by this <code>CtClass</code>
  948. object in the current directory.</div>
  949. </td>
  950. </tr>
  951. <tr id="i90" class="altColor">
  952. <td class="colFirst"><code>void</code></td>
  953. <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="../javassist/CtClass.html#writeFile-java.lang.String-">writeFile</a></span>&#8203;(java.lang.String&nbsp;directoryName)</code></th>
  954. <td class="colLast">
  955. <div class="block">Writes a class file represented by this <code>CtClass</code>
  956. object on a local disk.</div>
  957. </td>
  958. </tr>
  959. </table>
  960. <ul class="blockList">
  961. <li class="blockList"><a name="methods.inherited.from.class.java.lang.Object">
  962. <!-- -->
  963. </a>
  964. <h3>Methods inherited from class&nbsp;java.lang.Object</h3>
  965. <code>equals, getClass, hashCode, notify, notifyAll, wait, wait, wait</code></li>
  966. </ul>
  967. </li>
  968. </ul>
  969. </li>
  970. </ul>
  971. </div>
  972. <div class="details">
  973. <ul class="blockList">
  974. <li class="blockList">
  975. <!-- ============ FIELD DETAIL =========== -->
  976. <ul class="blockList">
  977. <li class="blockList"><a name="field.detail">
  978. <!-- -->
  979. </a>
  980. <h3>Field Detail</h3>
  981. <a name="debugDump">
  982. <!-- -->
  983. </a>
  984. <ul class="blockList">
  985. <li class="blockList">
  986. <h4>debugDump</h4>
  987. <pre>public static&nbsp;java.lang.String debugDump</pre>
  988. <div class="block">If the value of this field is not null, then all class
  989. files modified by Javassist are saved under the directory
  990. specified by this variable. For example, if the value is
  991. <code>"./debug"</code>, then all class files are saved
  992. there. The directory name must not end with a directory
  993. separator such as <code>/</code>.
  994. <p>The default value is null.</div>
  995. <dl>
  996. <dt><span class="simpleTagLabel">Since:</span></dt>
  997. <dd>3.16</dd>
  998. <dt><span class="seeLabel">See Also:</span></dt>
  999. <dd><a href="../javassist/CtClass.html#debugWriteFile-java.lang.String-"><code>debugWriteFile(String)</code></a></dd>
  1000. </dl>
  1001. </li>
  1002. </ul>
  1003. <a name="version">
  1004. <!-- -->
  1005. </a>
  1006. <ul class="blockList">
  1007. <li class="blockList">
  1008. <h4>version</h4>
  1009. <pre>public static final&nbsp;java.lang.String version</pre>
  1010. <div class="block">The version number of this release.</div>
  1011. <dl>
  1012. <dt><span class="seeLabel">See Also:</span></dt>
  1013. <dd><a href="../constant-values.html#javassist.CtClass.version">Constant Field Values</a></dd>
  1014. </dl>
  1015. </li>
  1016. </ul>
  1017. <a name="booleanType">
  1018. <!-- -->
  1019. </a>
  1020. <ul class="blockList">
  1021. <li class="blockList">
  1022. <h4>booleanType</h4>
  1023. <pre>public static&nbsp;<a href="../javassist/CtClass.html" title="class in javassist">CtClass</a> booleanType</pre>
  1024. <div class="block">The <code>CtClass</code> object representing
  1025. the <code>boolean</code> type.</div>
  1026. </li>
  1027. </ul>
  1028. <a name="charType">
  1029. <!-- -->
  1030. </a>
  1031. <ul class="blockList">
  1032. <li class="blockList">
  1033. <h4>charType</h4>
  1034. <pre>public static&nbsp;<a href="../javassist/CtClass.html" title="class in javassist">CtClass</a> charType</pre>
  1035. <div class="block">The <code>CtClass</code> object representing
  1036. the <code>char</code> type.</div>
  1037. </li>
  1038. </ul>
  1039. <a name="byteType">
  1040. <!-- -->
  1041. </a>
  1042. <ul class="blockList">
  1043. <li class="blockList">
  1044. <h4>byteType</h4>
  1045. <pre>public static&nbsp;<a href="../javassist/CtClass.html" title="class in javassist">CtClass</a> byteType</pre>
  1046. <div class="block">The <code>CtClass</code> object representing
  1047. the <code>byte</code> type.</div>
  1048. </li>
  1049. </ul>
  1050. <a name="shortType">
  1051. <!-- -->
  1052. </a>
  1053. <ul class="blockList">
  1054. <li class="blockList">
  1055. <h4>shortType</h4>
  1056. <pre>public static&nbsp;<a href="../javassist/CtClass.html" title="class in javassist">CtClass</a> shortType</pre>
  1057. <div class="block">The <code>CtClass</code> object representing
  1058. the <code>short</code> type.</div>
  1059. </li>
  1060. </ul>
  1061. <a name="intType">
  1062. <!-- -->
  1063. </a>
  1064. <ul class="blockList">
  1065. <li class="blockList">
  1066. <h4>intType</h4>
  1067. <pre>public static&nbsp;<a href="../javassist/CtClass.html" title="class in javassist">CtClass</a> intType</pre>
  1068. <div class="block">The <code>CtClass</code> object representing
  1069. the <code>int</code> type.</div>
  1070. </li>
  1071. </ul>
  1072. <a name="longType">
  1073. <!-- -->
  1074. </a>
  1075. <ul class="blockList">
  1076. <li class="blockList">
  1077. <h4>longType</h4>
  1078. <pre>public static&nbsp;<a href="../javassist/CtClass.html" title="class in javassist">CtClass</a> longType</pre>
  1079. <div class="block">The <code>CtClass</code> object representing
  1080. the <code>long</code> type.</div>
  1081. </li>
  1082. </ul>
  1083. <a name="floatType">
  1084. <!-- -->
  1085. </a>
  1086. <ul class="blockList">
  1087. <li class="blockList">
  1088. <h4>floatType</h4>
  1089. <pre>public static&nbsp;<a href="../javassist/CtClass.html" title="class in javassist">CtClass</a> floatType</pre>
  1090. <div class="block">The <code>CtClass</code> object representing
  1091. the <code>float</code> type.</div>
  1092. </li>
  1093. </ul>
  1094. <a name="doubleType">
  1095. <!-- -->
  1096. </a>
  1097. <ul class="blockList">
  1098. <li class="blockList">
  1099. <h4>doubleType</h4>
  1100. <pre>public static&nbsp;<a href="../javassist/CtClass.html" title="class in javassist">CtClass</a> doubleType</pre>
  1101. <div class="block">The <code>CtClass</code> object representing
  1102. the <code>double</code> type.</div>
  1103. </li>
  1104. </ul>
  1105. <a name="voidType">
  1106. <!-- -->
  1107. </a>
  1108. <ul class="blockListLast">
  1109. <li class="blockList">
  1110. <h4>voidType</h4>
  1111. <pre>public static&nbsp;<a href="../javassist/CtClass.html" title="class in javassist">CtClass</a> voidType</pre>
  1112. <div class="block">The <code>CtClass</code> object representing
  1113. the <code>void</code> type.</div>
  1114. </li>
  1115. </ul>
  1116. </li>
  1117. </ul>
  1118. <!-- ============ METHOD DETAIL ========== -->
  1119. <ul class="blockList">
  1120. <li class="blockList"><a name="method.detail">
  1121. <!-- -->
  1122. </a>
  1123. <h3>Method Detail</h3>
  1124. <a name="main-java.lang.String:A-">
  1125. <!-- -->
  1126. </a>
  1127. <ul class="blockList">
  1128. <li class="blockList">
  1129. <h4>main</h4>
  1130. <pre>public static&nbsp;void&nbsp;main&#8203;(java.lang.String[]&nbsp;args)</pre>
  1131. <div class="block">Prints the version number and the copyright notice.
  1132. <p>The following command invokes this method:
  1133. <pre>java -jar javassist.jar</pre></div>
  1134. </li>
  1135. </ul>
  1136. <a name="toString--">
  1137. <!-- -->
  1138. </a>
  1139. <ul class="blockList">
  1140. <li class="blockList">
  1141. <h4>toString</h4>
  1142. <pre>public&nbsp;java.lang.String&nbsp;toString()</pre>
  1143. <div class="block">Converts the object to a string.</div>
  1144. <dl>
  1145. <dt><span class="overrideSpecifyLabel">Overrides:</span></dt>
  1146. <dd><code>toString</code>&nbsp;in class&nbsp;<code>java.lang.Object</code></dd>
  1147. </dl>
  1148. </li>
  1149. </ul>
  1150. <a name="getClassPool--">
  1151. <!-- -->
  1152. </a>
  1153. <ul class="blockList">
  1154. <li class="blockList">
  1155. <h4>getClassPool</h4>
  1156. <pre>public&nbsp;<a href="../javassist/ClassPool.html" title="class in javassist">ClassPool</a>&nbsp;getClassPool()</pre>
  1157. <div class="block">Returns a <code>ClassPool</code> for this class.</div>
  1158. </li>
  1159. </ul>
  1160. <a name="getClassFile--">
  1161. <!-- -->
  1162. </a>
  1163. <ul class="blockList">
  1164. <li class="blockList">
  1165. <h4>getClassFile</h4>
  1166. <pre>public&nbsp;<a href="../javassist/bytecode/ClassFile.html" title="class in javassist.bytecode">ClassFile</a>&nbsp;getClassFile()</pre>
  1167. <div class="block">Returns a class file for this class.
  1168. <p>This method is not available if <code>isFrozen()</code>
  1169. is true.</div>
  1170. </li>
  1171. </ul>
  1172. <a name="getClassFile2--">
  1173. <!-- -->
  1174. </a>
  1175. <ul class="blockList">
  1176. <li class="blockList">
  1177. <h4>getClassFile2</h4>
  1178. <pre>public&nbsp;<a href="../javassist/bytecode/ClassFile.html" title="class in javassist.bytecode">ClassFile</a>&nbsp;getClassFile2()</pre>
  1179. <div class="block">Returns a class file for this class (read only).
  1180. Normal applications do not need calling this method. Use
  1181. <code>getClassFile()</code>.
  1182. <p>The <code>ClassFile</code> object obtained by this method
  1183. is read only. Changes to this object might not be reflected
  1184. on a class file generated by <code>toBytecode()</code>,
  1185. <code>toClass()</code>, etc.
  1186. <p>This method is available even if <code>isFrozen()</code>
  1187. is true. However, if the class is frozen, it might be also
  1188. pruned.</div>
  1189. <dl>
  1190. <dt><span class="seeLabel">See Also:</span></dt>
  1191. <dd><a href="../javassist/CtClass.html#getClassFile--"><code>getClassFile()</code></a>,
  1192. <a href="../javassist/CtClass.html#isFrozen--"><code>isFrozen()</code></a>,
  1193. <a href="../javassist/CtClass.html#prune--"><code>prune()</code></a></dd>
  1194. </dl>
  1195. </li>
  1196. </ul>
  1197. <a name="getAccessorMaker--">
  1198. <!-- -->
  1199. </a>
  1200. <ul class="blockList">
  1201. <li class="blockList">
  1202. <h4>getAccessorMaker</h4>
  1203. <pre>public&nbsp;javassist.compiler.AccessorMaker&nbsp;getAccessorMaker()</pre>
  1204. <div class="block">Undocumented method. Do not use; internal-use only.</div>
  1205. </li>
  1206. </ul>
  1207. <a name="getURL--">
  1208. <!-- -->
  1209. </a>
  1210. <ul class="blockList">
  1211. <li class="blockList">
  1212. <h4>getURL</h4>
  1213. <pre>public&nbsp;java.net.URL&nbsp;getURL()
  1214. throws <a href="../javassist/NotFoundException.html" title="class in javassist">NotFoundException</a></pre>
  1215. <div class="block">Returns the uniform resource locator (URL) of the class file.</div>
  1216. <dl>
  1217. <dt><span class="throwsLabel">Throws:</span></dt>
  1218. <dd><code><a href="../javassist/NotFoundException.html" title="class in javassist">NotFoundException</a></code></dd>
  1219. </dl>
  1220. </li>
  1221. </ul>
  1222. <a name="isModified--">
  1223. <!-- -->
  1224. </a>
  1225. <ul class="blockList">
  1226. <li class="blockList">
  1227. <h4>isModified</h4>
  1228. <pre>public&nbsp;boolean&nbsp;isModified()</pre>
  1229. <div class="block">Returns true if the definition of the class has been modified.</div>
  1230. </li>
  1231. </ul>
  1232. <a name="isFrozen--">
  1233. <!-- -->
  1234. </a>
  1235. <ul class="blockList">
  1236. <li class="blockList">
  1237. <h4>isFrozen</h4>
  1238. <pre>public&nbsp;boolean&nbsp;isFrozen()</pre>
  1239. <div class="block">Returns true if the class has been loaded or written out
  1240. and thus it cannot be modified any more.</div>
  1241. <dl>
  1242. <dt><span class="seeLabel">See Also:</span></dt>
  1243. <dd><a href="../javassist/CtClass.html#defrost--"><code>defrost()</code></a>,
  1244. <a href="../javassist/CtClass.html#detach--"><code>detach()</code></a></dd>
  1245. </dl>
  1246. </li>
  1247. </ul>
  1248. <a name="freeze--">
  1249. <!-- -->
  1250. </a>
  1251. <ul class="blockList">
  1252. <li class="blockList">
  1253. <h4>freeze</h4>
  1254. <pre>public&nbsp;void&nbsp;freeze()</pre>
  1255. <div class="block">Makes the class frozen.</div>
  1256. <dl>
  1257. <dt><span class="simpleTagLabel">Since:</span></dt>
  1258. <dd>3.6</dd>
  1259. <dt><span class="seeLabel">See Also:</span></dt>
  1260. <dd><a href="../javassist/CtClass.html#isFrozen--"><code>isFrozen()</code></a>,
  1261. <a href="../javassist/CtClass.html#defrost--"><code>defrost()</code></a></dd>
  1262. </dl>
  1263. </li>
  1264. </ul>
  1265. <a name="defrost--">
  1266. <!-- -->
  1267. </a>
  1268. <ul class="blockList">
  1269. <li class="blockList">
  1270. <h4>defrost</h4>
  1271. <pre>public&nbsp;void&nbsp;defrost()</pre>
  1272. <div class="block">Defrosts the class so that the class can be modified again.
  1273. <p>To avoid changes that will be never reflected,
  1274. the class is frozen to be unmodifiable if it is loaded or
  1275. written out. This method should be called only in a case
  1276. that the class will be reloaded or written out later again.
  1277. <p>If <code>defrost()</code> will be called later, pruning
  1278. must be disallowed in advance.</div>
  1279. <dl>
  1280. <dt><span class="seeLabel">See Also:</span></dt>
  1281. <dd><a href="../javassist/CtClass.html#isFrozen--"><code>isFrozen()</code></a>,
  1282. <a href="../javassist/CtClass.html#stopPruning-boolean-"><code>stopPruning(boolean)</code></a>,
  1283. <a href="../javassist/CtClass.html#detach--"><code>detach()</code></a></dd>
  1284. </dl>
  1285. </li>
  1286. </ul>
  1287. <a name="isPrimitive--">
  1288. <!-- -->
  1289. </a>
  1290. <ul class="blockList">
  1291. <li class="blockList">
  1292. <h4>isPrimitive</h4>
  1293. <pre>public&nbsp;boolean&nbsp;isPrimitive()</pre>
  1294. <div class="block">Returns <code>true</code> if this object represents a primitive
  1295. Java type: boolean, byte, char, short, int, long, float, double,
  1296. or void.</div>
  1297. </li>
  1298. </ul>
  1299. <a name="isArray--">
  1300. <!-- -->
  1301. </a>
  1302. <ul class="blockList">
  1303. <li class="blockList">
  1304. <h4>isArray</h4>
  1305. <pre>public&nbsp;boolean&nbsp;isArray()</pre>
  1306. <div class="block">Returns <code>true</code> if this object represents an array type.</div>
  1307. </li>
  1308. </ul>
  1309. <a name="getComponentType--">
  1310. <!-- -->
  1311. </a>
  1312. <ul class="blockList">
  1313. <li class="blockList">
  1314. <h4>getComponentType</h4>
  1315. <pre>public&nbsp;<a href="../javassist/CtClass.html" title="class in javassist">CtClass</a>&nbsp;getComponentType()
  1316. throws <a href="../javassist/NotFoundException.html" title="class in javassist">NotFoundException</a></pre>
  1317. <div class="block">If this object represents an array, this method returns the component
  1318. type of the array. Otherwise, it returns <code>null</code>.</div>
  1319. <dl>
  1320. <dt><span class="throwsLabel">Throws:</span></dt>
  1321. <dd><code><a href="../javassist/NotFoundException.html" title="class in javassist">NotFoundException</a></code></dd>
  1322. </dl>
  1323. </li>
  1324. </ul>
  1325. <a name="subtypeOf-javassist.CtClass-">
  1326. <!-- -->
  1327. </a>
  1328. <ul class="blockList">
  1329. <li class="blockList">
  1330. <h4>subtypeOf</h4>
  1331. <pre>public&nbsp;boolean&nbsp;subtypeOf&#8203;(<a href="../javassist/CtClass.html" title="class in javassist">CtClass</a>&nbsp;clazz)
  1332. throws <a href="../javassist/NotFoundException.html" title="class in javassist">NotFoundException</a></pre>
  1333. <div class="block">Returns <code>true</code> if this class extends or implements
  1334. <code>clazz</code>. It also returns <code>true</code> if
  1335. this class is the same as <code>clazz</code>.</div>
  1336. <dl>
  1337. <dt><span class="throwsLabel">Throws:</span></dt>
  1338. <dd><code><a href="../javassist/NotFoundException.html" title="class in javassist">NotFoundException</a></code></dd>
  1339. </dl>
  1340. </li>
  1341. </ul>
  1342. <a name="getName--">
  1343. <!-- -->
  1344. </a>
  1345. <ul class="blockList">
  1346. <li class="blockList">
  1347. <h4>getName</h4>
  1348. <pre>public&nbsp;java.lang.String&nbsp;getName()</pre>
  1349. <div class="block">Obtains the fully-qualified name of the class.</div>
  1350. </li>
  1351. </ul>
  1352. <a name="getSimpleName--">
  1353. <!-- -->
  1354. </a>
  1355. <ul class="blockList">
  1356. <li class="blockList">
  1357. <h4>getSimpleName</h4>
  1358. <pre>public final&nbsp;java.lang.String&nbsp;getSimpleName()</pre>
  1359. <div class="block">Obtains the not-qualified class name.</div>
  1360. </li>
  1361. </ul>
  1362. <a name="getPackageName--">
  1363. <!-- -->
  1364. </a>
  1365. <ul class="blockList">
  1366. <li class="blockList">
  1367. <h4>getPackageName</h4>
  1368. <pre>public final&nbsp;java.lang.String&nbsp;getPackageName()</pre>
  1369. <div class="block">Obtains the package name. It may be <code>null</code>.</div>
  1370. </li>
  1371. </ul>
  1372. <a name="setName-java.lang.String-">
  1373. <!-- -->
  1374. </a>
  1375. <ul class="blockList">
  1376. <li class="blockList">
  1377. <h4>setName</h4>
  1378. <pre>public&nbsp;void&nbsp;setName&#8203;(java.lang.String&nbsp;name)</pre>
  1379. <div class="block">Sets the class name</div>
  1380. <dl>
  1381. <dt><span class="paramLabel">Parameters:</span></dt>
  1382. <dd><code>name</code> - fully-qualified name</dd>
  1383. </dl>
  1384. </li>
  1385. </ul>
  1386. <a name="getGenericSignature--">
  1387. <!-- -->
  1388. </a>
  1389. <ul class="blockList">
  1390. <li class="blockList">
  1391. <h4>getGenericSignature</h4>
  1392. <pre>public&nbsp;java.lang.String&nbsp;getGenericSignature()</pre>
  1393. <div class="block">Returns the generic signature of the class.
  1394. <p>The generics of Java is implemented by the erasure technique.
  1395. After compilation, all type parameters are dropped off from the
  1396. main part of a class file. However, for reflection, the type
  1397. parameters are encoded into generic signatures and attached
  1398. to a class file.</div>
  1399. <dl>
  1400. <dt><span class="returnLabel">Returns:</span></dt>
  1401. <dd>null if the generic signature is not included.</dd>
  1402. <dt><span class="simpleTagLabel">Since:</span></dt>
  1403. <dd>3.17</dd>
  1404. <dt><span class="seeLabel">See Also:</span></dt>
  1405. <dd><a href="../javassist/bytecode/SignatureAttribute.html#toClassSignature-java.lang.String-"><code>SignatureAttribute.toClassSignature(String)</code></a>,
  1406. <a href="../javassist/CtMember.html#getGenericSignature--"><code>CtMember.getGenericSignature()</code></a></dd>
  1407. </dl>
  1408. </li>
  1409. </ul>
  1410. <a name="setGenericSignature-java.lang.String-">
  1411. <!-- -->
  1412. </a>
  1413. <ul class="blockList">
  1414. <li class="blockList">
  1415. <h4>setGenericSignature</h4>
  1416. <pre>public&nbsp;void&nbsp;setGenericSignature&#8203;(java.lang.String&nbsp;sig)</pre>
  1417. <div class="block">Sets the generic signature of the class.
  1418. <p>The generics of Java is implemented by the erasure technique.
  1419. After compilation, all type parameters are dropped off from the
  1420. main part of a class file. However, for reflection, the type
  1421. parameters must be encoded into generic signatures and attached
  1422. to a class file.
  1423. <p>For example,
  1424. <pre>class List&lt;T&gt; {
  1425. T value;
  1426. T get() { return value; }
  1427. void set(T v) { value = v; }
  1428. }
  1429. </pre>
  1430. <p>this class is generated by the following code:
  1431. <pre>
  1432. ClassPool pool = ClassPool.getDefault();
  1433. CtClass cc = pool.makeClass("List");
  1434. CtClass objectClass = pool.get(CtClass.javaLangObject);
  1435. ClassSignature cs = new ClassSignature(
  1436. new TypeParameter[] { new TypeParameter("T") });
  1437. cc.setGenericSignature(cs.encode()); // &lt;T:Ljava/lang/Object;&gt;Ljava/lang/Object;
  1438. CtField f = new CtField(objClass, "value", cc);
  1439. TypeVariable tvar = new TypeVariable("T");
  1440. f.setGenericSignature(tvar.encode()); // TT;
  1441. cc.addField(f);
  1442. CtMethod m = CtNewMethod.make("public Object get(){return value;}", cc);
  1443. MethodSignature ms = new MethodSignature(null, null, tvar, null);
  1444. m.setGenericSignature(ms.encode()); // ()TT;
  1445. cc.addMethod(m);
  1446. CtMethod m2 = CtNewMethod.make("public void set(Object v){value = v;}", cc);
  1447. MethodSignature ms2 = new MethodSignature(null, new Type[] { tvar },
  1448. new BaseType("void"), null);
  1449. m2.setGenericSignature(ms2.encode()); // (TT;)V;
  1450. cc.addMethod(m2);
  1451. cc.writeFile();
  1452. </pre>
  1453. <p>The generated class file is equivalent to the following:
  1454. <pre>class List {
  1455. Object value;
  1456. Object get() { return value; }
  1457. void set(Object v) { value = v; }
  1458. }</pre>
  1459. <p>but it includes generic signatures for the class, the field,
  1460. and the methods so that the type variable <code>T</code> can be
  1461. accessible through reflection.
  1462. <p><code>MethodSignature</code> is a utility class. You can directly
  1463. pass the signature string to the <code>setGenericSignature</code> method.
  1464. For the specification of the signatures, see Section 4.7.9.1 <i>Signatures</i>
  1465. of The Java Virtual Machine Specification (Java SE 8).</div>
  1466. <dl>
  1467. <dt><span class="paramLabel">Parameters:</span></dt>
  1468. <dd><code>sig</code> - a generic signature.</dd>
  1469. <dt><span class="simpleTagLabel">Since:</span></dt>
  1470. <dd>3.17</dd>
  1471. <dt><span class="seeLabel">See Also:</span></dt>
  1472. <dd><a href="../javassist/bytecode/SignatureAttribute.ClassSignature.html#encode--"><code>SignatureAttribute.ClassSignature.encode()</code></a>,
  1473. <a href="../javassist/bytecode/SignatureAttribute.MethodSignature.html#encode--"><code>SignatureAttribute.MethodSignature.encode()</code></a>,
  1474. <a href="../javassist/CtMember.html#setGenericSignature-java.lang.String-"><code>CtMember.setGenericSignature(String)</code></a></dd>
  1475. </dl>
  1476. </li>
  1477. </ul>
  1478. <a name="replaceClassName-java.lang.String-java.lang.String-">
  1479. <!-- -->
  1480. </a>
  1481. <ul class="blockList">
  1482. <li class="blockList">
  1483. <h4>replaceClassName</h4>
  1484. <pre>public&nbsp;void&nbsp;replaceClassName&#8203;(java.lang.String&nbsp;oldName,
  1485. java.lang.String&nbsp;newName)</pre>
  1486. <div class="block">Substitutes <code>newName</code> for all occurrences of a class
  1487. name <code>oldName</code> in the class file.</div>
  1488. <dl>
  1489. <dt><span class="paramLabel">Parameters:</span></dt>
  1490. <dd><code>oldName</code> - replaced class name</dd>
  1491. <dd><code>newName</code> - substituted class name</dd>
  1492. </dl>
  1493. </li>
  1494. </ul>
  1495. <a name="replaceClassName-javassist.ClassMap-">
  1496. <!-- -->
  1497. </a>
  1498. <ul class="blockList">
  1499. <li class="blockList">
  1500. <h4>replaceClassName</h4>
  1501. <pre>public&nbsp;void&nbsp;replaceClassName&#8203;(<a href="../javassist/ClassMap.html" title="class in javassist">ClassMap</a>&nbsp;map)</pre>
  1502. <div class="block">Changes class names appearing in the class file according to the
  1503. given <code>map</code>.
  1504. <p>All the class names appearing in the class file are tested
  1505. with <code>map</code> to determine whether each class name is
  1506. replaced or not. Thus this method can be used for collecting
  1507. all the class names in the class file. To do that, first define
  1508. a subclass of <code>ClassMap</code> so that <code>get()</code>
  1509. records all the given parameters. Then, make an instance of
  1510. that subclass as an empty hash-table. Finally, pass that instance
  1511. to this method. After this method finishes, that instance would
  1512. contain all the class names appearing in the class file.</div>
  1513. <dl>
  1514. <dt><span class="paramLabel">Parameters:</span></dt>
  1515. <dd><code>map</code> - the hashtable associating replaced class names
  1516. with substituted names.</dd>
  1517. </dl>
  1518. </li>
  1519. </ul>
  1520. <a name="getRefClasses--">
  1521. <!-- -->
  1522. </a>
  1523. <ul class="blockList">
  1524. <li class="blockList">
  1525. <h4>getRefClasses</h4>
  1526. <pre>public&nbsp;java.util.Collection&lt;java.lang.String&gt;&nbsp;getRefClasses()</pre>
  1527. <div class="block">Returns a collection of the names of all the classes
  1528. referenced in this class.
  1529. That collection includes the name of this class.
  1530. <p>This method may return <code>null</code>.</div>
  1531. <dl>
  1532. <dt><span class="returnLabel">Returns:</span></dt>
  1533. <dd>a <code>Collection&lt;String&gt;</code> object.</dd>
  1534. </dl>
  1535. </li>
  1536. </ul>
  1537. <a name="isInterface--">
  1538. <!-- -->
  1539. </a>
  1540. <ul class="blockList">
  1541. <li class="blockList">
  1542. <h4>isInterface</h4>
  1543. <pre>public&nbsp;boolean&nbsp;isInterface()</pre>
  1544. <div class="block">Determines whether this object represents a class or an interface.
  1545. It returns <code>true</code> if this object represents an interface.</div>
  1546. </li>
  1547. </ul>
  1548. <a name="isAnnotation--">
  1549. <!-- -->
  1550. </a>
  1551. <ul class="blockList">
  1552. <li class="blockList">
  1553. <h4>isAnnotation</h4>
  1554. <pre>public&nbsp;boolean&nbsp;isAnnotation()</pre>
  1555. <div class="block">Determines whether this object represents an annotation type.
  1556. It returns <code>true</code> if this object represents an annotation type.</div>
  1557. <dl>
  1558. <dt><span class="simpleTagLabel">Since:</span></dt>
  1559. <dd>3.2</dd>
  1560. </dl>
  1561. </li>
  1562. </ul>
  1563. <a name="isEnum--">
  1564. <!-- -->
  1565. </a>
  1566. <ul class="blockList">
  1567. <li class="blockList">
  1568. <h4>isEnum</h4>
  1569. <pre>public&nbsp;boolean&nbsp;isEnum()</pre>
  1570. <div class="block">Determines whether this object represents an enum.
  1571. It returns <code>true</code> if this object represents an enum.</div>
  1572. <dl>
  1573. <dt><span class="simpleTagLabel">Since:</span></dt>
  1574. <dd>3.2</dd>
  1575. </dl>
  1576. </li>
  1577. </ul>
  1578. <a name="getModifiers--">
  1579. <!-- -->
  1580. </a>
  1581. <ul class="blockList">
  1582. <li class="blockList">
  1583. <h4>getModifiers</h4>
  1584. <pre>public&nbsp;int&nbsp;getModifiers()</pre>
  1585. <div class="block">Returns the modifiers for this class, encoded in an integer.
  1586. For decoding, use <code>javassist.Modifier</code>.
  1587. <p>If the class is a static nested class (a.k.a. static inner class),
  1588. the returned modifiers include <code>Modifier.STATIC</code>.</div>
  1589. <dl>
  1590. <dt><span class="seeLabel">See Also:</span></dt>
  1591. <dd><a href="../javassist/Modifier.html" title="class in javassist"><code>Modifier</code></a></dd>
  1592. </dl>
  1593. </li>
  1594. </ul>
  1595. <a name="hasAnnotation-java.lang.Class-">
  1596. <!-- -->
  1597. </a>
  1598. <ul class="blockList">
  1599. <li class="blockList">
  1600. <h4>hasAnnotation</h4>
  1601. <pre>public&nbsp;boolean&nbsp;hasAnnotation&#8203;(java.lang.Class&lt;?&gt;&nbsp;annotationType)</pre>
  1602. <div class="block">Returns true if the class has the specified annotation type.</div>
  1603. <dl>
  1604. <dt><span class="paramLabel">Parameters:</span></dt>
  1605. <dd><code>annotationType</code> - the annotation type.</dd>
  1606. <dt><span class="returnLabel">Returns:</span></dt>
  1607. <dd><code>true</code> if the annotation is found, otherwise <code>false</code>.</dd>
  1608. <dt><span class="simpleTagLabel">Since:</span></dt>
  1609. <dd>3.11</dd>
  1610. </dl>
  1611. </li>
  1612. </ul>
  1613. <a name="hasAnnotation-java.lang.String-">
  1614. <!-- -->
  1615. </a>
  1616. <ul class="blockList">
  1617. <li class="blockList">
  1618. <h4>hasAnnotation</h4>
  1619. <pre>public&nbsp;boolean&nbsp;hasAnnotation&#8203;(java.lang.String&nbsp;annotationTypeName)</pre>
  1620. <div class="block">Returns true if the class has the specified annotation type.</div>
  1621. <dl>
  1622. <dt><span class="paramLabel">Parameters:</span></dt>
  1623. <dd><code>annotationTypeName</code> - the name of annotation type.</dd>
  1624. <dt><span class="returnLabel">Returns:</span></dt>
  1625. <dd><code>true</code> if the annotation is found, otherwise <code>false</code>.</dd>
  1626. <dt><span class="simpleTagLabel">Since:</span></dt>
  1627. <dd>3.21</dd>
  1628. </dl>
  1629. </li>
  1630. </ul>
  1631. <a name="getAnnotation-java.lang.Class-">
  1632. <!-- -->
  1633. </a>
  1634. <ul class="blockList">
  1635. <li class="blockList">
  1636. <h4>getAnnotation</h4>
  1637. <pre>public&nbsp;java.lang.Object&nbsp;getAnnotation&#8203;(java.lang.Class&lt;?&gt;&nbsp;clz)
  1638. throws java.lang.ClassNotFoundException</pre>
  1639. <div class="block">Returns the annotation if the class has the specified annotation type.
  1640. For example, if an annotation <code>@Author</code> is associated
  1641. with this class, an <code>Author</code> object is returned.
  1642. The member values can be obtained by calling methods on
  1643. the <code>Author</code> object.</div>
  1644. <dl>
  1645. <dt><span class="paramLabel">Parameters:</span></dt>
  1646. <dd><code>clz</code> - the annotation type.</dd>
  1647. <dt><span class="returnLabel">Returns:</span></dt>
  1648. <dd>the annotation if found, otherwise <code>null</code>.</dd>
  1649. <dt><span class="throwsLabel">Throws:</span></dt>
  1650. <dd><code>java.lang.ClassNotFoundException</code></dd>
  1651. <dt><span class="simpleTagLabel">Since:</span></dt>
  1652. <dd>3.11</dd>
  1653. </dl>
  1654. </li>
  1655. </ul>
  1656. <a name="getAnnotations--">
  1657. <!-- -->
  1658. </a>
  1659. <ul class="blockList">
  1660. <li class="blockList">
  1661. <h4>getAnnotations</h4>
  1662. <pre>public&nbsp;java.lang.Object[]&nbsp;getAnnotations()
  1663. throws java.lang.ClassNotFoundException</pre>
  1664. <div class="block">Returns the annotations associated with this class.
  1665. For example, if an annotation <code>@Author</code> is associated
  1666. with this class, the returned array contains an <code>Author</code>
  1667. object. The member values can be obtained by calling methods on
  1668. the <code>Author</code> object.</div>
  1669. <dl>
  1670. <dt><span class="returnLabel">Returns:</span></dt>
  1671. <dd>an array of annotation-type objects.</dd>
  1672. <dt><span class="throwsLabel">Throws:</span></dt>
  1673. <dd><code>java.lang.ClassNotFoundException</code></dd>
  1674. <dt><span class="simpleTagLabel">Since:</span></dt>
  1675. <dd>3.1</dd>
  1676. <dt><span class="seeLabel">See Also:</span></dt>
  1677. <dd><a href="../javassist/CtMember.html#getAnnotations--"><code>CtMember.getAnnotations()</code></a></dd>
  1678. </dl>
  1679. </li>
  1680. </ul>
  1681. <a name="getAvailableAnnotations--">
  1682. <!-- -->
  1683. </a>
  1684. <ul class="blockList">
  1685. <li class="blockList">
  1686. <h4>getAvailableAnnotations</h4>
  1687. <pre>public&nbsp;java.lang.Object[]&nbsp;getAvailableAnnotations()</pre>
  1688. <div class="block">Returns the annotations associated with this class.
  1689. This method is equivalent to <code>getAnnotations()</code>
  1690. except that, if any annotations are not on the classpath,
  1691. they are not included in the returned array.</div>
  1692. <dl>
  1693. <dt><span class="returnLabel">Returns:</span></dt>
  1694. <dd>an array of annotation-type objects.</dd>
  1695. <dt><span class="simpleTagLabel">Since:</span></dt>
  1696. <dd>3.3</dd>
  1697. <dt><span class="seeLabel">See Also:</span></dt>
  1698. <dd><a href="../javassist/CtClass.html#getAnnotations--"><code>getAnnotations()</code></a>,
  1699. <a href="../javassist/CtMember.html#getAvailableAnnotations--"><code>CtMember.getAvailableAnnotations()</code></a></dd>
  1700. </dl>
  1701. </li>
  1702. </ul>
  1703. <a name="getDeclaredClasses--">
  1704. <!-- -->
  1705. </a>
  1706. <ul class="blockList">
  1707. <li class="blockList">
  1708. <h4>getDeclaredClasses</h4>
  1709. <pre>public&nbsp;<a href="../javassist/CtClass.html" title="class in javassist">CtClass</a>[]&nbsp;getDeclaredClasses()
  1710. throws <a href="../javassist/NotFoundException.html" title="class in javassist">NotFoundException</a></pre>
  1711. <div class="block">Returns an array of nested classes declared in the class.
  1712. Nested classes are inner classes, anonymous classes, local classes,
  1713. and static nested classes. This simply calls <code>getNestedClasses()</code>.</div>
  1714. <dl>
  1715. <dt><span class="throwsLabel">Throws:</span></dt>
  1716. <dd><code><a href="../javassist/NotFoundException.html" title="class in javassist">NotFoundException</a></code></dd>
  1717. <dt><span class="simpleTagLabel">Since:</span></dt>
  1718. <dd>3.15</dd>
  1719. <dt><span class="seeLabel">See Also:</span></dt>
  1720. <dd><a href="../javassist/CtClass.html#getNestedClasses--"><code>getNestedClasses()</code></a></dd>
  1721. </dl>
  1722. </li>
  1723. </ul>
  1724. <a name="getNestedClasses--">
  1725. <!-- -->
  1726. </a>
  1727. <ul class="blockList">
  1728. <li class="blockList">
  1729. <h4>getNestedClasses</h4>
  1730. <pre>public&nbsp;<a href="../javassist/CtClass.html" title="class in javassist">CtClass</a>[]&nbsp;getNestedClasses()
  1731. throws <a href="../javassist/NotFoundException.html" title="class in javassist">NotFoundException</a></pre>
  1732. <div class="block">Returns an array of nested classes declared in the class.
  1733. Nested classes are inner classes, anonymous classes, local classes,
  1734. and static nested classes.</div>
  1735. <dl>
  1736. <dt><span class="throwsLabel">Throws:</span></dt>
  1737. <dd><code><a href="../javassist/NotFoundException.html" title="class in javassist">NotFoundException</a></code></dd>
  1738. <dt><span class="simpleTagLabel">Since:</span></dt>
  1739. <dd>3.2</dd>
  1740. </dl>
  1741. </li>
  1742. </ul>
  1743. <a name="setModifiers-int-">
  1744. <!-- -->
  1745. </a>
  1746. <ul class="blockList">
  1747. <li class="blockList">
  1748. <h4>setModifiers</h4>
  1749. <pre>public&nbsp;void&nbsp;setModifiers&#8203;(int&nbsp;mod)</pre>
  1750. <div class="block">Sets the modifiers.
  1751. <p>If the class is a nested class, this method also modifies
  1752. the class declaring that nested class (i.e. the enclosing
  1753. class is modified).</div>
  1754. <dl>
  1755. <dt><span class="paramLabel">Parameters:</span></dt>
  1756. <dd><code>mod</code> - modifiers encoded by
  1757. <code>javassist.Modifier</code></dd>
  1758. <dt><span class="seeLabel">See Also:</span></dt>
  1759. <dd><a href="../javassist/Modifier.html" title="class in javassist"><code>Modifier</code></a></dd>
  1760. </dl>
  1761. </li>
  1762. </ul>
  1763. <a name="subclassOf-javassist.CtClass-">
  1764. <!-- -->
  1765. </a>
  1766. <ul class="blockList">
  1767. <li class="blockList">
  1768. <h4>subclassOf</h4>
  1769. <pre>public&nbsp;boolean&nbsp;subclassOf&#8203;(<a href="../javassist/CtClass.html" title="class in javassist">CtClass</a>&nbsp;superclass)</pre>
  1770. <div class="block">Determines whether the class directly or indirectly extends
  1771. the given class. If this class extends a class A and
  1772. the class A extends a class B, then subclassof(B) returns true.
  1773. <p>This method returns true if the given class is identical to
  1774. the class represented by this object.</div>
  1775. </li>
  1776. </ul>
  1777. <a name="getSuperclass--">
  1778. <!-- -->
  1779. </a>
  1780. <ul class="blockList">
  1781. <li class="blockList">
  1782. <h4>getSuperclass</h4>
  1783. <pre>public&nbsp;<a href="../javassist/CtClass.html" title="class in javassist">CtClass</a>&nbsp;getSuperclass()
  1784. throws <a href="../javassist/NotFoundException.html" title="class in javassist">NotFoundException</a></pre>
  1785. <div class="block">Obtains the class object representing the superclass of the
  1786. class.
  1787. It returns null if this object represents the
  1788. <code>java.lang.Object</code> class and thus it does not have
  1789. the super class.
  1790. <p>If this object represents an interface, this method
  1791. always returns the <code>java.lang.Object</code> class.
  1792. To obtain the super interfaces
  1793. extended by that interface, call <code>getInterfaces()</code>.</div>
  1794. <dl>
  1795. <dt><span class="throwsLabel">Throws:</span></dt>
  1796. <dd><code><a href="../javassist/NotFoundException.html" title="class in javassist">NotFoundException</a></code></dd>
  1797. </dl>
  1798. </li>
  1799. </ul>
  1800. <a name="setSuperclass-javassist.CtClass-">
  1801. <!-- -->
  1802. </a>
  1803. <ul class="blockList">
  1804. <li class="blockList">
  1805. <h4>setSuperclass</h4>
  1806. <pre>public&nbsp;void&nbsp;setSuperclass&#8203;(<a href="../javassist/CtClass.html" title="class in javassist">CtClass</a>&nbsp;clazz)
  1807. throws <a href="../javassist/CannotCompileException.html" title="class in javassist">CannotCompileException</a></pre>
  1808. <div class="block">Changes a super class unless this object represents an interface.
  1809. The new super class must be compatible with the old one; for example,
  1810. it should inherit from the old super class.
  1811. <p>If this object represents an interface, this method is equivalent
  1812. to <code>addInterface()</code>; it appends <code>clazz</code> to
  1813. the list of the super interfaces extended by that interface.
  1814. Note that an interface can extend multiple super interfaces.</div>
  1815. <dl>
  1816. <dt><span class="throwsLabel">Throws:</span></dt>
  1817. <dd><code><a href="../javassist/CannotCompileException.html" title="class in javassist">CannotCompileException</a></code></dd>
  1818. <dt><span class="seeLabel">See Also:</span></dt>
  1819. <dd><a href="../javassist/CtClass.html#replaceClassName-java.lang.String-java.lang.String-"><code>replaceClassName(String, String)</code></a>,
  1820. <a href="../javassist/CtClass.html#replaceClassName-javassist.ClassMap-"><code>replaceClassName(ClassMap)</code></a></dd>
  1821. </dl>
  1822. </li>
  1823. </ul>
  1824. <a name="getInterfaces--">
  1825. <!-- -->
  1826. </a>
  1827. <ul class="blockList">
  1828. <li class="blockList">
  1829. <h4>getInterfaces</h4>
  1830. <pre>public&nbsp;<a href="../javassist/CtClass.html" title="class in javassist">CtClass</a>[]&nbsp;getInterfaces()
  1831. throws <a href="../javassist/NotFoundException.html" title="class in javassist">NotFoundException</a></pre>
  1832. <div class="block">Obtains the class objects representing the interfaces implemented
  1833. by the class or, if this object represents an interface, the interfaces
  1834. extended by that interface.</div>
  1835. <dl>
  1836. <dt><span class="throwsLabel">Throws:</span></dt>
  1837. <dd><code><a href="../javassist/NotFoundException.html" title="class in javassist">NotFoundException</a></code></dd>
  1838. </dl>
  1839. </li>
  1840. </ul>
  1841. <a name="setInterfaces-javassist.CtClass:A-">
  1842. <!-- -->
  1843. </a>
  1844. <ul class="blockList">
  1845. <li class="blockList">
  1846. <h4>setInterfaces</h4>
  1847. <pre>public&nbsp;void&nbsp;setInterfaces&#8203;(<a href="../javassist/CtClass.html" title="class in javassist">CtClass</a>[]&nbsp;list)</pre>
  1848. <div class="block">Sets implemented interfaces. If this object represents an interface,
  1849. this method sets the interfaces extended by that interface.</div>
  1850. <dl>
  1851. <dt><span class="paramLabel">Parameters:</span></dt>
  1852. <dd><code>list</code> - a list of the <code>CtClass</code> objects
  1853. representing interfaces, or
  1854. <code>null</code> if the class implements
  1855. no interfaces.</dd>
  1856. </dl>
  1857. </li>
  1858. </ul>
  1859. <a name="addInterface-javassist.CtClass-">
  1860. <!-- -->
  1861. </a>
  1862. <ul class="blockList">
  1863. <li class="blockList">
  1864. <h4>addInterface</h4>
  1865. <pre>public&nbsp;void&nbsp;addInterface&#8203;(<a href="../javassist/CtClass.html" title="class in javassist">CtClass</a>&nbsp;anInterface)</pre>
  1866. <div class="block">Adds an interface.</div>
  1867. <dl>
  1868. <dt><span class="paramLabel">Parameters:</span></dt>
  1869. <dd><code>anInterface</code> - the added interface.</dd>
  1870. </dl>
  1871. </li>
  1872. </ul>
  1873. <a name="getDeclaringClass--">
  1874. <!-- -->
  1875. </a>
  1876. <ul class="blockList">
  1877. <li class="blockList">
  1878. <h4>getDeclaringClass</h4>
  1879. <pre>public&nbsp;<a href="../javassist/CtClass.html" title="class in javassist">CtClass</a>&nbsp;getDeclaringClass()
  1880. throws <a href="../javassist/NotFoundException.html" title="class in javassist">NotFoundException</a></pre>
  1881. <div class="block">If this class is a member class or interface of another class,
  1882. then the class enclosing this class is returned.</div>
  1883. <dl>
  1884. <dt><span class="returnLabel">Returns:</span></dt>
  1885. <dd>null if this class is a top-level class or an anonymous class.</dd>
  1886. <dt><span class="throwsLabel">Throws:</span></dt>
  1887. <dd><code><a href="../javassist/NotFoundException.html" title="class in javassist">NotFoundException</a></code></dd>
  1888. </dl>
  1889. </li>
  1890. </ul>
  1891. <a name="getEnclosingMethod--">
  1892. <!-- -->
  1893. </a>
  1894. <ul class="blockList">
  1895. <li class="blockList">
  1896. <h4>getEnclosingMethod</h4>
  1897. <pre>@Deprecated
  1898. public final&nbsp;<a href="../javassist/CtMethod.html" title="class in javassist">CtMethod</a>&nbsp;getEnclosingMethod()
  1899. throws <a href="../javassist/NotFoundException.html" title="class in javassist">NotFoundException</a></pre>
  1900. <div class="deprecationBlock"><span class="deprecatedLabel">Deprecated.</span>
  1901. <div class="deprecationComment">The enclosing method might be a constructor.
  1902. Use <a href="../javassist/CtClass.html#getEnclosingBehavior--"><code>getEnclosingBehavior()</code></a>.</div>
  1903. </div>
  1904. <div class="block">Returns the immediately enclosing method of this class.
  1905. This method works only with JDK 1.5 or later.</div>
  1906. <dl>
  1907. <dt><span class="returnLabel">Returns:</span></dt>
  1908. <dd>null if this class is not a local class or an anonymous
  1909. class.</dd>
  1910. <dt><span class="throwsLabel">Throws:</span></dt>
  1911. <dd><code><a href="../javassist/NotFoundException.html" title="class in javassist">NotFoundException</a></code></dd>
  1912. <dt><span class="seeLabel">See Also:</span></dt>
  1913. <dd><a href="../javassist/CtClass.html#getEnclosingBehavior--"><code>getEnclosingBehavior()</code></a></dd>
  1914. </dl>
  1915. </li>
  1916. </ul>
  1917. <a name="getEnclosingBehavior--">
  1918. <!-- -->
  1919. </a>
  1920. <ul class="blockList">
  1921. <li class="blockList">
  1922. <h4>getEnclosingBehavior</h4>
  1923. <pre>public&nbsp;<a href="../javassist/CtBehavior.html" title="class in javassist">CtBehavior</a>&nbsp;getEnclosingBehavior()
  1924. throws <a href="../javassist/NotFoundException.html" title="class in javassist">NotFoundException</a></pre>
  1925. <div class="block">Returns the immediately enclosing method of this class.
  1926. It might be not a method but a constructor.
  1927. This method works only with JDK 1.5 or later.</div>
  1928. <dl>
  1929. <dt><span class="returnLabel">Returns:</span></dt>
  1930. <dd>null if this class is not a local class or an anonymous
  1931. class.</dd>
  1932. <dt><span class="throwsLabel">Throws:</span></dt>
  1933. <dd><code><a href="../javassist/NotFoundException.html" title="class in javassist">NotFoundException</a></code></dd>
  1934. </dl>
  1935. </li>
  1936. </ul>
  1937. <a name="makeNestedClass-java.lang.String-boolean-">
  1938. <!-- -->
  1939. </a>
  1940. <ul class="blockList">
  1941. <li class="blockList">
  1942. <h4>makeNestedClass</h4>
  1943. <pre>public&nbsp;<a href="../javassist/CtClass.html" title="class in javassist">CtClass</a>&nbsp;makeNestedClass&#8203;(java.lang.String&nbsp;name,
  1944. boolean&nbsp;isStatic)</pre>
  1945. <div class="block">Makes a new public nested class. If this method is called,
  1946. the <code>CtClass</code>, which encloses the nested class, is modified
  1947. since a class file includes a list of nested classes.
  1948. <p>The current implementation only supports a static nested class.
  1949. <code>isStatic</code> must be true.</div>
  1950. <dl>
  1951. <dt><span class="paramLabel">Parameters:</span></dt>
  1952. <dd><code>name</code> - the simple name of the nested class.</dd>
  1953. <dd><code>isStatic</code> - true if the nested class is static.</dd>
  1954. </dl>
  1955. </li>
  1956. </ul>
  1957. <a name="getFields--">
  1958. <!-- -->
  1959. </a>
  1960. <ul class="blockList">
  1961. <li class="blockList">
  1962. <h4>getFields</h4>
  1963. <pre>public&nbsp;<a href="../javassist/CtField.html" title="class in javassist">CtField</a>[]&nbsp;getFields()</pre>
  1964. <div class="block">Returns an array containing <code>CtField</code> objects
  1965. representing all the non-private fields of the class.
  1966. That array includes non-private fields inherited from the
  1967. superclasses.</div>
  1968. </li>
  1969. </ul>
  1970. <a name="getField-java.lang.String-">
  1971. <!-- -->
  1972. </a>
  1973. <ul class="blockList">
  1974. <li class="blockList">
  1975. <h4>getField</h4>
  1976. <pre>public&nbsp;<a href="../javassist/CtField.html" title="class in javassist">CtField</a>&nbsp;getField&#8203;(java.lang.String&nbsp;name)
  1977. throws <a href="../javassist/NotFoundException.html" title="class in javassist">NotFoundException</a></pre>
  1978. <div class="block">Returns the field with the specified name. The returned field
  1979. may be a private field declared in a super class or interface.</div>
  1980. <dl>
  1981. <dt><span class="throwsLabel">Throws:</span></dt>
  1982. <dd><code><a href="../javassist/NotFoundException.html" title="class in javassist">NotFoundException</a></code></dd>
  1983. </dl>
  1984. </li>
  1985. </ul>
  1986. <a name="getField-java.lang.String-java.lang.String-">
  1987. <!-- -->
  1988. </a>
  1989. <ul class="blockList">
  1990. <li class="blockList">
  1991. <h4>getField</h4>
  1992. <pre>public&nbsp;<a href="../javassist/CtField.html" title="class in javassist">CtField</a>&nbsp;getField&#8203;(java.lang.String&nbsp;name,
  1993. java.lang.String&nbsp;desc)
  1994. throws <a href="../javassist/NotFoundException.html" title="class in javassist">NotFoundException</a></pre>
  1995. <div class="block">Returns the field with the specified name and type. The returned field
  1996. may be a private field declared in a super class or interface.
  1997. Unlike Java, the JVM allows a class to have
  1998. multiple fields with the same name but different types.</div>
  1999. <dl>
  2000. <dt><span class="paramLabel">Parameters:</span></dt>
  2001. <dd><code>name</code> - the field name.</dd>
  2002. <dd><code>desc</code> - the type descriptor of the field. It is available by
  2003. <a href="../javassist/CtField.html#getSignature--"><code>CtField.getSignature()</code></a>.</dd>
  2004. <dt><span class="throwsLabel">Throws:</span></dt>
  2005. <dd><code><a href="../javassist/NotFoundException.html" title="class in javassist">NotFoundException</a></code></dd>
  2006. <dt><span class="seeLabel">See Also:</span></dt>
  2007. <dd><a href="../javassist/CtField.html#getSignature--"><code>CtField.getSignature()</code></a></dd>
  2008. </dl>
  2009. </li>
  2010. </ul>
  2011. <a name="getDeclaredFields--">
  2012. <!-- -->
  2013. </a>
  2014. <ul class="blockList">
  2015. <li class="blockList">
  2016. <h4>getDeclaredFields</h4>
  2017. <pre>public&nbsp;<a href="../javassist/CtField.html" title="class in javassist">CtField</a>[]&nbsp;getDeclaredFields()</pre>
  2018. <div class="block">Gets all the fields declared in the class. The inherited fields
  2019. are not included.
  2020. <p>Note: the result does not include inherited fields.</div>
  2021. </li>
  2022. </ul>
  2023. <a name="getDeclaredField-java.lang.String-">
  2024. <!-- -->
  2025. </a>
  2026. <ul class="blockList">
  2027. <li class="blockList">
  2028. <h4>getDeclaredField</h4>
  2029. <pre>public&nbsp;<a href="../javassist/CtField.html" title="class in javassist">CtField</a>&nbsp;getDeclaredField&#8203;(java.lang.String&nbsp;name)
  2030. throws <a href="../javassist/NotFoundException.html" title="class in javassist">NotFoundException</a></pre>
  2031. <div class="block">Retrieves the field with the specified name among the fields
  2032. declared in the class.
  2033. <p>Note: this method does not search the super classes.</div>
  2034. <dl>
  2035. <dt><span class="throwsLabel">Throws:</span></dt>
  2036. <dd><code><a href="../javassist/NotFoundException.html" title="class in javassist">NotFoundException</a></code></dd>
  2037. </dl>
  2038. </li>
  2039. </ul>
  2040. <a name="getDeclaredField-java.lang.String-java.lang.String-">
  2041. <!-- -->
  2042. </a>
  2043. <ul class="blockList">
  2044. <li class="blockList">
  2045. <h4>getDeclaredField</h4>
  2046. <pre>public&nbsp;<a href="../javassist/CtField.html" title="class in javassist">CtField</a>&nbsp;getDeclaredField&#8203;(java.lang.String&nbsp;name,
  2047. java.lang.String&nbsp;desc)
  2048. throws <a href="../javassist/NotFoundException.html" title="class in javassist">NotFoundException</a></pre>
  2049. <div class="block">Retrieves the field with the specified name and type among the fields
  2050. declared in the class. Unlike Java, the JVM allows a class to have
  2051. multiple fields with the same name but different types.
  2052. <p>Note: this method does not search the super classes.</div>
  2053. <dl>
  2054. <dt><span class="paramLabel">Parameters:</span></dt>
  2055. <dd><code>name</code> - the field name.</dd>
  2056. <dd><code>desc</code> - the type descriptor of the field. It is available by
  2057. <a href="../javassist/CtField.html#getSignature--"><code>CtField.getSignature()</code></a>.</dd>
  2058. <dt><span class="throwsLabel">Throws:</span></dt>
  2059. <dd><code><a href="../javassist/NotFoundException.html" title="class in javassist">NotFoundException</a></code></dd>
  2060. <dt><span class="seeLabel">See Also:</span></dt>
  2061. <dd><a href="../javassist/CtField.html#getSignature--"><code>CtField.getSignature()</code></a></dd>
  2062. </dl>
  2063. </li>
  2064. </ul>
  2065. <a name="getDeclaredBehaviors--">
  2066. <!-- -->
  2067. </a>
  2068. <ul class="blockList">
  2069. <li class="blockList">
  2070. <h4>getDeclaredBehaviors</h4>
  2071. <pre>public&nbsp;<a href="../javassist/CtBehavior.html" title="class in javassist">CtBehavior</a>[]&nbsp;getDeclaredBehaviors()</pre>
  2072. <div class="block">Gets all the constructors and methods declared in the class.</div>
  2073. </li>
  2074. </ul>
  2075. <a name="getConstructors--">
  2076. <!-- -->
  2077. </a>
  2078. <ul class="blockList">
  2079. <li class="blockList">
  2080. <h4>getConstructors</h4>
  2081. <pre>public&nbsp;<a href="../javassist/CtConstructor.html" title="class in javassist">CtConstructor</a>[]&nbsp;getConstructors()</pre>
  2082. <div class="block">Returns an array containing <code>CtConstructor</code> objects
  2083. representing all the non-private constructors of the class.</div>
  2084. </li>
  2085. </ul>
  2086. <a name="getConstructor-java.lang.String-">
  2087. <!-- -->
  2088. </a>
  2089. <ul class="blockList">
  2090. <li class="blockList">
  2091. <h4>getConstructor</h4>
  2092. <pre>public&nbsp;<a href="../javassist/CtConstructor.html" title="class in javassist">CtConstructor</a>&nbsp;getConstructor&#8203;(java.lang.String&nbsp;desc)
  2093. throws <a href="../javassist/NotFoundException.html" title="class in javassist">NotFoundException</a></pre>
  2094. <div class="block">Returns the constructor with the given signature,
  2095. which is represented by a character string
  2096. called method descriptor.
  2097. For details of the method descriptor, see the JVM specification
  2098. or <code>javassist.bytecode.Descriptor</code>.</div>
  2099. <dl>
  2100. <dt><span class="paramLabel">Parameters:</span></dt>
  2101. <dd><code>desc</code> - method descriptor</dd>
  2102. <dt><span class="throwsLabel">Throws:</span></dt>
  2103. <dd><code><a href="../javassist/NotFoundException.html" title="class in javassist">NotFoundException</a></code></dd>
  2104. <dt><span class="seeLabel">See Also:</span></dt>
  2105. <dd><a href="../javassist/bytecode/Descriptor.html" title="class in javassist.bytecode"><code>Descriptor</code></a></dd>
  2106. </dl>
  2107. </li>
  2108. </ul>
  2109. <a name="getDeclaredConstructors--">
  2110. <!-- -->
  2111. </a>
  2112. <ul class="blockList">
  2113. <li class="blockList">
  2114. <h4>getDeclaredConstructors</h4>
  2115. <pre>public&nbsp;<a href="../javassist/CtConstructor.html" title="class in javassist">CtConstructor</a>[]&nbsp;getDeclaredConstructors()</pre>
  2116. <div class="block">Gets all the constructors declared in the class.</div>
  2117. <dl>
  2118. <dt><span class="seeLabel">See Also:</span></dt>
  2119. <dd><a href="../javassist/CtConstructor.html" title="class in javassist"><code>CtConstructor</code></a></dd>
  2120. </dl>
  2121. </li>
  2122. </ul>
  2123. <a name="getDeclaredConstructor-javassist.CtClass:A-">
  2124. <!-- -->
  2125. </a>
  2126. <ul class="blockList">
  2127. <li class="blockList">
  2128. <h4>getDeclaredConstructor</h4>
  2129. <pre>public&nbsp;<a href="../javassist/CtConstructor.html" title="class in javassist">CtConstructor</a>&nbsp;getDeclaredConstructor&#8203;(<a href="../javassist/CtClass.html" title="class in javassist">CtClass</a>[]&nbsp;params)
  2130. throws <a href="../javassist/NotFoundException.html" title="class in javassist">NotFoundException</a></pre>
  2131. <div class="block">Returns a constructor receiving the specified parameters.</div>
  2132. <dl>
  2133. <dt><span class="paramLabel">Parameters:</span></dt>
  2134. <dd><code>params</code> - parameter types.</dd>
  2135. <dt><span class="throwsLabel">Throws:</span></dt>
  2136. <dd><code><a href="../javassist/NotFoundException.html" title="class in javassist">NotFoundException</a></code></dd>
  2137. </dl>
  2138. </li>
  2139. </ul>
  2140. <a name="getClassInitializer--">
  2141. <!-- -->
  2142. </a>
  2143. <ul class="blockList">
  2144. <li class="blockList">
  2145. <h4>getClassInitializer</h4>
  2146. <pre>public&nbsp;<a href="../javassist/CtConstructor.html" title="class in javassist">CtConstructor</a>&nbsp;getClassInitializer()</pre>
  2147. <div class="block">Gets the class initializer (static constructor)
  2148. declared in the class.
  2149. This method returns <code>null</code> if
  2150. no class initializer is not declared.</div>
  2151. <dl>
  2152. <dt><span class="seeLabel">See Also:</span></dt>
  2153. <dd><a href="../javassist/CtClass.html#makeClassInitializer--"><code>makeClassInitializer()</code></a>,
  2154. <a href="../javassist/CtConstructor.html" title="class in javassist"><code>CtConstructor</code></a></dd>
  2155. </dl>
  2156. </li>
  2157. </ul>
  2158. <a name="getMethods--">
  2159. <!-- -->
  2160. </a>
  2161. <ul class="blockList">
  2162. <li class="blockList">
  2163. <h4>getMethods</h4>
  2164. <pre>public&nbsp;<a href="../javassist/CtMethod.html" title="class in javassist">CtMethod</a>[]&nbsp;getMethods()</pre>
  2165. <div class="block">Returns an array containing <code>CtMethod</code> objects
  2166. representing all the non-private methods of the class.
  2167. That array includes non-private methods inherited from the
  2168. superclasses.</div>
  2169. </li>
  2170. </ul>
  2171. <a name="getMethod-java.lang.String-java.lang.String-">
  2172. <!-- -->
  2173. </a>
  2174. <ul class="blockList">
  2175. <li class="blockList">
  2176. <h4>getMethod</h4>
  2177. <pre>public&nbsp;<a href="../javassist/CtMethod.html" title="class in javassist">CtMethod</a>&nbsp;getMethod&#8203;(java.lang.String&nbsp;name,
  2178. java.lang.String&nbsp;desc)
  2179. throws <a href="../javassist/NotFoundException.html" title="class in javassist">NotFoundException</a></pre>
  2180. <div class="block">Returns the method with the given name and signature.
  2181. The returned method may be declared in a super class.
  2182. The method signature is represented by a character string
  2183. called method descriptor,
  2184. which is defined in the JVM specification.</div>
  2185. <dl>
  2186. <dt><span class="paramLabel">Parameters:</span></dt>
  2187. <dd><code>name</code> - method name</dd>
  2188. <dd><code>desc</code> - method descriptor</dd>
  2189. <dt><span class="throwsLabel">Throws:</span></dt>
  2190. <dd><code><a href="../javassist/NotFoundException.html" title="class in javassist">NotFoundException</a></code></dd>
  2191. <dt><span class="seeLabel">See Also:</span></dt>
  2192. <dd><a href="../javassist/CtBehavior.html#getSignature--"><code>CtBehavior.getSignature()</code></a>,
  2193. <a href="../javassist/bytecode/Descriptor.html" title="class in javassist.bytecode"><code>Descriptor</code></a></dd>
  2194. </dl>
  2195. </li>
  2196. </ul>
  2197. <a name="getDeclaredMethods--">
  2198. <!-- -->
  2199. </a>
  2200. <ul class="blockList">
  2201. <li class="blockList">
  2202. <h4>getDeclaredMethods</h4>
  2203. <pre>public&nbsp;<a href="../javassist/CtMethod.html" title="class in javassist">CtMethod</a>[]&nbsp;getDeclaredMethods()</pre>
  2204. <div class="block">Gets all methods declared in the class. The inherited methods
  2205. are not included.</div>
  2206. <dl>
  2207. <dt><span class="seeLabel">See Also:</span></dt>
  2208. <dd><a href="../javassist/CtMethod.html" title="class in javassist"><code>CtMethod</code></a></dd>
  2209. </dl>
  2210. </li>
  2211. </ul>
  2212. <a name="getDeclaredMethod-java.lang.String-javassist.CtClass:A-">
  2213. <!-- -->
  2214. </a>
  2215. <ul class="blockList">
  2216. <li class="blockList">
  2217. <h4>getDeclaredMethod</h4>
  2218. <pre>public&nbsp;<a href="../javassist/CtMethod.html" title="class in javassist">CtMethod</a>&nbsp;getDeclaredMethod&#8203;(java.lang.String&nbsp;name,
  2219. <a href="../javassist/CtClass.html" title="class in javassist">CtClass</a>[]&nbsp;params)
  2220. throws <a href="../javassist/NotFoundException.html" title="class in javassist">NotFoundException</a></pre>
  2221. <div class="block">Retrieves the method with the specified name and parameter types
  2222. among the methods declared in the class.
  2223. <p>Note: this method does not search the superclasses.</div>
  2224. <dl>
  2225. <dt><span class="paramLabel">Parameters:</span></dt>
  2226. <dd><code>name</code> - method name</dd>
  2227. <dd><code>params</code> - parameter types</dd>
  2228. <dt><span class="throwsLabel">Throws:</span></dt>
  2229. <dd><code><a href="../javassist/NotFoundException.html" title="class in javassist">NotFoundException</a></code></dd>
  2230. <dt><span class="seeLabel">See Also:</span></dt>
  2231. <dd><a href="../javassist/CtMethod.html" title="class in javassist"><code>CtMethod</code></a></dd>
  2232. </dl>
  2233. </li>
  2234. </ul>
  2235. <a name="getDeclaredMethods-java.lang.String-">
  2236. <!-- -->
  2237. </a>
  2238. <ul class="blockList">
  2239. <li class="blockList">
  2240. <h4>getDeclaredMethods</h4>
  2241. <pre>public&nbsp;<a href="../javassist/CtMethod.html" title="class in javassist">CtMethod</a>[]&nbsp;getDeclaredMethods&#8203;(java.lang.String&nbsp;name)
  2242. throws <a href="../javassist/NotFoundException.html" title="class in javassist">NotFoundException</a></pre>
  2243. <div class="block">Retrieves methods with the specified name among the methods
  2244. declared in the class. Multiple methods with different parameters
  2245. may be returned.
  2246. <p>Note: this method does not search the superclasses.</p></div>
  2247. <dl>
  2248. <dt><span class="paramLabel">Parameters:</span></dt>
  2249. <dd><code>name</code> - method name.</dd>
  2250. <dt><span class="throwsLabel">Throws:</span></dt>
  2251. <dd><code><a href="../javassist/NotFoundException.html" title="class in javassist">NotFoundException</a></code></dd>
  2252. <dt><span class="simpleTagLabel">Since:</span></dt>
  2253. <dd>3.19</dd>
  2254. </dl>
  2255. </li>
  2256. </ul>
  2257. <a name="getDeclaredMethod-java.lang.String-">
  2258. <!-- -->
  2259. </a>
  2260. <ul class="blockList">
  2261. <li class="blockList">
  2262. <h4>getDeclaredMethod</h4>
  2263. <pre>public&nbsp;<a href="../javassist/CtMethod.html" title="class in javassist">CtMethod</a>&nbsp;getDeclaredMethod&#8203;(java.lang.String&nbsp;name)
  2264. throws <a href="../javassist/NotFoundException.html" title="class in javassist">NotFoundException</a></pre>
  2265. <div class="block">Retrieves the method with the specified name among the methods
  2266. declared in the class. If there are multiple methods with
  2267. the specified name, then this method returns one of them.
  2268. <p>Note: this method does not search the superclasses.</div>
  2269. <dl>
  2270. <dt><span class="throwsLabel">Throws:</span></dt>
  2271. <dd><code><a href="../javassist/NotFoundException.html" title="class in javassist">NotFoundException</a></code></dd>
  2272. <dt><span class="seeLabel">See Also:</span></dt>
  2273. <dd><a href="../javassist/CtMethod.html" title="class in javassist"><code>CtMethod</code></a></dd>
  2274. </dl>
  2275. </li>
  2276. </ul>
  2277. <a name="makeClassInitializer--">
  2278. <!-- -->
  2279. </a>
  2280. <ul class="blockList">
  2281. <li class="blockList">
  2282. <h4>makeClassInitializer</h4>
  2283. <pre>public&nbsp;<a href="../javassist/CtConstructor.html" title="class in javassist">CtConstructor</a>&nbsp;makeClassInitializer()
  2284. throws <a href="../javassist/CannotCompileException.html" title="class in javassist">CannotCompileException</a></pre>
  2285. <div class="block">Makes an empty class initializer (static constructor).
  2286. If the class already includes a class initializer,
  2287. this method returns it.</div>
  2288. <dl>
  2289. <dt><span class="throwsLabel">Throws:</span></dt>
  2290. <dd><code><a href="../javassist/CannotCompileException.html" title="class in javassist">CannotCompileException</a></code></dd>
  2291. <dt><span class="seeLabel">See Also:</span></dt>
  2292. <dd><a href="../javassist/CtClass.html#getClassInitializer--"><code>getClassInitializer()</code></a></dd>
  2293. </dl>
  2294. </li>
  2295. </ul>
  2296. <a name="addConstructor-javassist.CtConstructor-">
  2297. <!-- -->
  2298. </a>
  2299. <ul class="blockList">
  2300. <li class="blockList">
  2301. <h4>addConstructor</h4>
  2302. <pre>public&nbsp;void&nbsp;addConstructor&#8203;(<a href="../javassist/CtConstructor.html" title="class in javassist">CtConstructor</a>&nbsp;c)
  2303. throws <a href="../javassist/CannotCompileException.html" title="class in javassist">CannotCompileException</a></pre>
  2304. <div class="block">Adds a constructor. To add a class initializer (static constructor),
  2305. call <code>makeClassInitializer()</code>.</div>
  2306. <dl>
  2307. <dt><span class="throwsLabel">Throws:</span></dt>
  2308. <dd><code><a href="../javassist/CannotCompileException.html" title="class in javassist">CannotCompileException</a></code></dd>
  2309. <dt><span class="seeLabel">See Also:</span></dt>
  2310. <dd><a href="../javassist/CtClass.html#makeClassInitializer--"><code>makeClassInitializer()</code></a></dd>
  2311. </dl>
  2312. </li>
  2313. </ul>
  2314. <a name="removeConstructor-javassist.CtConstructor-">
  2315. <!-- -->
  2316. </a>
  2317. <ul class="blockList">
  2318. <li class="blockList">
  2319. <h4>removeConstructor</h4>
  2320. <pre>public&nbsp;void&nbsp;removeConstructor&#8203;(<a href="../javassist/CtConstructor.html" title="class in javassist">CtConstructor</a>&nbsp;c)
  2321. throws <a href="../javassist/NotFoundException.html" title="class in javassist">NotFoundException</a></pre>
  2322. <div class="block">Removes a constructor declared in this class.</div>
  2323. <dl>
  2324. <dt><span class="paramLabel">Parameters:</span></dt>
  2325. <dd><code>c</code> - removed constructor.</dd>
  2326. <dt><span class="throwsLabel">Throws:</span></dt>
  2327. <dd><code><a href="../javassist/NotFoundException.html" title="class in javassist">NotFoundException</a></code> - if the constructor is not found.</dd>
  2328. </dl>
  2329. </li>
  2330. </ul>
  2331. <a name="addMethod-javassist.CtMethod-">
  2332. <!-- -->
  2333. </a>
  2334. <ul class="blockList">
  2335. <li class="blockList">
  2336. <h4>addMethod</h4>
  2337. <pre>public&nbsp;void&nbsp;addMethod&#8203;(<a href="../javassist/CtMethod.html" title="class in javassist">CtMethod</a>&nbsp;m)
  2338. throws <a href="../javassist/CannotCompileException.html" title="class in javassist">CannotCompileException</a></pre>
  2339. <div class="block">Adds a method.</div>
  2340. <dl>
  2341. <dt><span class="throwsLabel">Throws:</span></dt>
  2342. <dd><code><a href="../javassist/CannotCompileException.html" title="class in javassist">CannotCompileException</a></code></dd>
  2343. </dl>
  2344. </li>
  2345. </ul>
  2346. <a name="removeMethod-javassist.CtMethod-">
  2347. <!-- -->
  2348. </a>
  2349. <ul class="blockList">
  2350. <li class="blockList">
  2351. <h4>removeMethod</h4>
  2352. <pre>public&nbsp;void&nbsp;removeMethod&#8203;(<a href="../javassist/CtMethod.html" title="class in javassist">CtMethod</a>&nbsp;m)
  2353. throws <a href="../javassist/NotFoundException.html" title="class in javassist">NotFoundException</a></pre>
  2354. <div class="block">Removes a method declared in this class.</div>
  2355. <dl>
  2356. <dt><span class="paramLabel">Parameters:</span></dt>
  2357. <dd><code>m</code> - removed method.</dd>
  2358. <dt><span class="throwsLabel">Throws:</span></dt>
  2359. <dd><code><a href="../javassist/NotFoundException.html" title="class in javassist">NotFoundException</a></code> - if the method is not found.</dd>
  2360. </dl>
  2361. </li>
  2362. </ul>
  2363. <a name="addField-javassist.CtField-">
  2364. <!-- -->
  2365. </a>
  2366. <ul class="blockList">
  2367. <li class="blockList">
  2368. <h4>addField</h4>
  2369. <pre>public&nbsp;void&nbsp;addField&#8203;(<a href="../javassist/CtField.html" title="class in javassist">CtField</a>&nbsp;f)
  2370. throws <a href="../javassist/CannotCompileException.html" title="class in javassist">CannotCompileException</a></pre>
  2371. <div class="block">Adds a field.
  2372. <p>The <code>CtField</code> belonging to another
  2373. <code>CtClass</code> cannot be directly added to this class.
  2374. Only a field created for this class can be added.</div>
  2375. <dl>
  2376. <dt><span class="throwsLabel">Throws:</span></dt>
  2377. <dd><code><a href="../javassist/CannotCompileException.html" title="class in javassist">CannotCompileException</a></code></dd>
  2378. <dt><span class="seeLabel">See Also:</span></dt>
  2379. <dd><a href="../javassist/CtField.html#CtField-javassist.CtField-javassist.CtClass-"><code>CtField(CtField,CtClass)</code></a></dd>
  2380. </dl>
  2381. </li>
  2382. </ul>
  2383. <a name="addField-javassist.CtField-java.lang.String-">
  2384. <!-- -->
  2385. </a>
  2386. <ul class="blockList">
  2387. <li class="blockList">
  2388. <h4>addField</h4>
  2389. <pre>public&nbsp;void&nbsp;addField&#8203;(<a href="../javassist/CtField.html" title="class in javassist">CtField</a>&nbsp;f,
  2390. java.lang.String&nbsp;init)
  2391. throws <a href="../javassist/CannotCompileException.html" title="class in javassist">CannotCompileException</a></pre>
  2392. <div class="block">Adds a field with an initial value.
  2393. <p>The <code>CtField</code> belonging to another
  2394. <code>CtClass</code> cannot be directly added to this class.
  2395. Only a field created for this class can be added.
  2396. <p>The initial value is given as an expression written in Java.
  2397. Any regular Java expression can be used for specifying the initial
  2398. value. The followings are examples.
  2399. <pre>
  2400. cc.addField(f, "0") // the initial value is 0.
  2401. cc.addField(f, "i + 1") // i + 1.
  2402. cc.addField(f, "new Point()"); // a Point object.
  2403. </pre>
  2404. <p>Here, the type of variable <code>cc</code> is <code>CtClass</code>.
  2405. The type of <code>f</code> is <code>CtField</code>.
  2406. <p>Note: do not change the modifier of the field
  2407. (in particular, do not add or remove <code>static</code>
  2408. to/from the modifier)
  2409. after it is added to the class by <code>addField()</code>.</div>
  2410. <dl>
  2411. <dt><span class="paramLabel">Parameters:</span></dt>
  2412. <dd><code>init</code> - an expression for the initial value.</dd>
  2413. <dt><span class="throwsLabel">Throws:</span></dt>
  2414. <dd><code><a href="../javassist/CannotCompileException.html" title="class in javassist">CannotCompileException</a></code></dd>
  2415. <dt><span class="seeLabel">See Also:</span></dt>
  2416. <dd><a href="../javassist/CtField.Initializer.html#byExpr-java.lang.String-"><code>CtField.Initializer.byExpr(String)</code></a>,
  2417. <a href="../javassist/CtField.html#CtField-javassist.CtField-javassist.CtClass-"><code>CtField(CtField,CtClass)</code></a></dd>
  2418. </dl>
  2419. </li>
  2420. </ul>
  2421. <a name="addField-javassist.CtField-javassist.CtField.Initializer-">
  2422. <!-- -->
  2423. </a>
  2424. <ul class="blockList">
  2425. <li class="blockList">
  2426. <h4>addField</h4>
  2427. <pre>public&nbsp;void&nbsp;addField&#8203;(<a href="../javassist/CtField.html" title="class in javassist">CtField</a>&nbsp;f,
  2428. <a href="../javassist/CtField.Initializer.html" title="class in javassist">CtField.Initializer</a>&nbsp;init)
  2429. throws <a href="../javassist/CannotCompileException.html" title="class in javassist">CannotCompileException</a></pre>
  2430. <div class="block">Adds a field with an initial value.
  2431. <p>The <code>CtField</code> belonging to another
  2432. <code>CtClass</code> cannot be directly added to this class.
  2433. Only a field created for this class can be added.
  2434. <p>For example,
  2435. <pre>
  2436. CtClass cc = ...;
  2437. addField(new CtField(CtClass.intType, "i", cc),
  2438. CtField.Initializer.constant(1));
  2439. </pre>
  2440. <p>This code adds an <code>int</code> field named "i". The
  2441. initial value of this field is 1.</div>
  2442. <dl>
  2443. <dt><span class="paramLabel">Parameters:</span></dt>
  2444. <dd><code>init</code> - specifies the initial value of the field.</dd>
  2445. <dt><span class="throwsLabel">Throws:</span></dt>
  2446. <dd><code><a href="../javassist/CannotCompileException.html" title="class in javassist">CannotCompileException</a></code></dd>
  2447. <dt><span class="seeLabel">See Also:</span></dt>
  2448. <dd><a href="../javassist/CtField.html#CtField-javassist.CtField-javassist.CtClass-"><code>CtField(CtField,CtClass)</code></a></dd>
  2449. </dl>
  2450. </li>
  2451. </ul>
  2452. <a name="removeField-javassist.CtField-">
  2453. <!-- -->
  2454. </a>
  2455. <ul class="blockList">
  2456. <li class="blockList">
  2457. <h4>removeField</h4>
  2458. <pre>public&nbsp;void&nbsp;removeField&#8203;(<a href="../javassist/CtField.html" title="class in javassist">CtField</a>&nbsp;f)
  2459. throws <a href="../javassist/NotFoundException.html" title="class in javassist">NotFoundException</a></pre>
  2460. <div class="block">Removes a field declared in this class.</div>
  2461. <dl>
  2462. <dt><span class="paramLabel">Parameters:</span></dt>
  2463. <dd><code>f</code> - removed field.</dd>
  2464. <dt><span class="throwsLabel">Throws:</span></dt>
  2465. <dd><code><a href="../javassist/NotFoundException.html" title="class in javassist">NotFoundException</a></code> - if the field is not found.</dd>
  2466. </dl>
  2467. </li>
  2468. </ul>
  2469. <a name="getAttribute-java.lang.String-">
  2470. <!-- -->
  2471. </a>
  2472. <ul class="blockList">
  2473. <li class="blockList">
  2474. <h4>getAttribute</h4>
  2475. <pre>public&nbsp;byte[]&nbsp;getAttribute&#8203;(java.lang.String&nbsp;name)</pre>
  2476. <div class="block">Obtains an attribute with the given name.
  2477. If that attribute is not found in the class file, this
  2478. method returns null.
  2479. <p>This is a convenient method mainly for obtaining
  2480. a user-defined attribute. For dealing with attributes, see the
  2481. <code>javassist.bytecode</code> package. For example, the following
  2482. expression returns all the attributes of a class file.
  2483. <pre>
  2484. getClassFile().getAttributes()
  2485. </pre></div>
  2486. <dl>
  2487. <dt><span class="paramLabel">Parameters:</span></dt>
  2488. <dd><code>name</code> - attribute name</dd>
  2489. <dt><span class="seeLabel">See Also:</span></dt>
  2490. <dd><a href="../javassist/bytecode/AttributeInfo.html" title="class in javassist.bytecode"><code>AttributeInfo</code></a></dd>
  2491. </dl>
  2492. </li>
  2493. </ul>
  2494. <a name="setAttribute-java.lang.String-byte:A-">
  2495. <!-- -->
  2496. </a>
  2497. <ul class="blockList">
  2498. <li class="blockList">
  2499. <h4>setAttribute</h4>
  2500. <pre>public&nbsp;void&nbsp;setAttribute&#8203;(java.lang.String&nbsp;name,
  2501. byte[]&nbsp;data)</pre>
  2502. <div class="block">Adds a named attribute.
  2503. An arbitrary data (smaller than 64Kb) can be saved in the class
  2504. file. Some attribute name are reserved by the JVM.
  2505. The attributes with the non-reserved names are ignored when a
  2506. class file is loaded into the JVM.
  2507. If there is already an attribute with
  2508. the same name, this method substitutes the new one for it.
  2509. <p>This is a convenient method mainly for adding
  2510. a user-defined attribute. For dealing with attributes, see the
  2511. <code>javassist.bytecode</code> package. For example, the following
  2512. expression adds an attribute <code>info</code> to a class file.
  2513. <pre>
  2514. getClassFile().addAttribute(info)
  2515. </pre></div>
  2516. <dl>
  2517. <dt><span class="paramLabel">Parameters:</span></dt>
  2518. <dd><code>name</code> - attribute name</dd>
  2519. <dd><code>data</code> - attribute value</dd>
  2520. <dt><span class="seeLabel">See Also:</span></dt>
  2521. <dd><a href="../javassist/bytecode/AttributeInfo.html" title="class in javassist.bytecode"><code>AttributeInfo</code></a></dd>
  2522. </dl>
  2523. </li>
  2524. </ul>
  2525. <a name="instrument-javassist.CodeConverter-">
  2526. <!-- -->
  2527. </a>
  2528. <ul class="blockList">
  2529. <li class="blockList">
  2530. <h4>instrument</h4>
  2531. <pre>public&nbsp;void&nbsp;instrument&#8203;(<a href="../javassist/CodeConverter.html" title="class in javassist">CodeConverter</a>&nbsp;converter)
  2532. throws <a href="../javassist/CannotCompileException.html" title="class in javassist">CannotCompileException</a></pre>
  2533. <div class="block">Applies the given converter to all methods and constructors
  2534. declared in the class. This method calls <code>instrument()</code>
  2535. on every <code>CtMethod</code> and <code>CtConstructor</code> object
  2536. in the class.</div>
  2537. <dl>
  2538. <dt><span class="paramLabel">Parameters:</span></dt>
  2539. <dd><code>converter</code> - specifies how to modify.</dd>
  2540. <dt><span class="throwsLabel">Throws:</span></dt>
  2541. <dd><code><a href="../javassist/CannotCompileException.html" title="class in javassist">CannotCompileException</a></code></dd>
  2542. </dl>
  2543. </li>
  2544. </ul>
  2545. <a name="instrument-javassist.expr.ExprEditor-">
  2546. <!-- -->
  2547. </a>
  2548. <ul class="blockList">
  2549. <li class="blockList">
  2550. <h4>instrument</h4>
  2551. <pre>public&nbsp;void&nbsp;instrument&#8203;(<a href="../javassist/expr/ExprEditor.html" title="class in javassist.expr">ExprEditor</a>&nbsp;editor)
  2552. throws <a href="../javassist/CannotCompileException.html" title="class in javassist">CannotCompileException</a></pre>
  2553. <div class="block">Modifies the bodies of all methods and constructors
  2554. declared in the class. This method calls <code>instrument()</code>
  2555. on every <code>CtMethod</code> and <code>CtConstructor</code> object
  2556. in the class.</div>
  2557. <dl>
  2558. <dt><span class="paramLabel">Parameters:</span></dt>
  2559. <dd><code>editor</code> - specifies how to modify.</dd>
  2560. <dt><span class="throwsLabel">Throws:</span></dt>
  2561. <dd><code><a href="../javassist/CannotCompileException.html" title="class in javassist">CannotCompileException</a></code></dd>
  2562. </dl>
  2563. </li>
  2564. </ul>
  2565. <a name="toClass--">
  2566. <!-- -->
  2567. </a>
  2568. <ul class="blockList">
  2569. <li class="blockList">
  2570. <h4>toClass</h4>
  2571. <pre>public&nbsp;java.lang.Class&lt;?&gt;&nbsp;toClass()
  2572. throws <a href="../javassist/CannotCompileException.html" title="class in javassist">CannotCompileException</a></pre>
  2573. <div class="block">Converts this class to a <code>java.lang.Class</code> object.
  2574. Once this method is called, further modifications are not
  2575. allowed any more.
  2576. To load the class, this method uses the context class loader
  2577. of the current thread. If the program is running on some application
  2578. server, the context class loader might be inappropriate to load the
  2579. class.
  2580. <p>This method is provided for convenience. If you need more
  2581. complex functionality, you should write your own class loader.
  2582. <p>Note: this method calls <code>toClass()</code>
  2583. in <code>ClassPool</code>.
  2584. <p><b>Warining:</b> A Class object returned by this method may not
  2585. work with a security manager or a signed jar file because a
  2586. protection domain is not specified.</div>
  2587. <dl>
  2588. <dt><span class="throwsLabel">Throws:</span></dt>
  2589. <dd><code><a href="../javassist/CannotCompileException.html" title="class in javassist">CannotCompileException</a></code></dd>
  2590. <dt><span class="seeLabel">See Also:</span></dt>
  2591. <dd><a href="../javassist/CtClass.html#toClass-java.lang.ClassLoader-java.security.ProtectionDomain-"><code>toClass(java.lang.ClassLoader,ProtectionDomain)</code></a>,
  2592. <a href="../javassist/ClassPool.html#toClass-javassist.CtClass-"><code>ClassPool.toClass(CtClass)</code></a></dd>
  2593. </dl>
  2594. </li>
  2595. </ul>
  2596. <a name="toClass-java.lang.ClassLoader-java.security.ProtectionDomain-">
  2597. <!-- -->
  2598. </a>
  2599. <ul class="blockList">
  2600. <li class="blockList">
  2601. <h4>toClass</h4>
  2602. <pre>public&nbsp;java.lang.Class&lt;?&gt;&nbsp;toClass&#8203;(java.lang.ClassLoader&nbsp;loader,
  2603. java.security.ProtectionDomain&nbsp;domain)
  2604. throws <a href="../javassist/CannotCompileException.html" title="class in javassist">CannotCompileException</a></pre>
  2605. <div class="block">Converts this class to a <code>java.lang.Class</code> object.
  2606. Once this method is called, further modifications are not allowed
  2607. any more.
  2608. <p>The class file represented by this <code>CtClass</code> is
  2609. loaded by the given class loader to construct a
  2610. <code>java.lang.Class</code> object. Since a private method
  2611. on the class loader is invoked through the reflection API,
  2612. the caller must have permissions to do that.
  2613. <p>An easy way to obtain <code>ProtectionDomain</code> object is
  2614. to call <code>getProtectionDomain()</code>
  2615. in <code>java.lang.Class</code>. It returns the domain that
  2616. the class belongs to.
  2617. <p>This method is provided for convenience. If you need more
  2618. complex functionality, you should write your own class loader.
  2619. <p>Note: this method calls <code>toClass()</code>
  2620. in <code>ClassPool</code>.</div>
  2621. <dl>
  2622. <dt><span class="paramLabel">Parameters:</span></dt>
  2623. <dd><code>loader</code> - the class loader used to load this class.
  2624. If it is null, the class loader returned by
  2625. <a href="../javassist/ClassPool.html#getClassLoader--"><code>ClassPool.getClassLoader()</code></a> is used.</dd>
  2626. <dd><code>domain</code> - the protection domain that the class belongs to.
  2627. If it is null, the default domain created
  2628. by <code>java.lang.ClassLoader</code> is used.</dd>
  2629. <dt><span class="throwsLabel">Throws:</span></dt>
  2630. <dd><code><a href="../javassist/CannotCompileException.html" title="class in javassist">CannotCompileException</a></code></dd>
  2631. <dt><span class="simpleTagLabel">Since:</span></dt>
  2632. <dd>3.3</dd>
  2633. <dt><span class="seeLabel">See Also:</span></dt>
  2634. <dd><a href="../javassist/ClassPool.html#toClass-javassist.CtClass-java.lang.ClassLoader-"><code>ClassPool.toClass(CtClass,java.lang.ClassLoader)</code></a></dd>
  2635. </dl>
  2636. </li>
  2637. </ul>
  2638. <a name="toClass-java.lang.ClassLoader-">
  2639. <!-- -->
  2640. </a>
  2641. <ul class="blockList">
  2642. <li class="blockList">
  2643. <h4>toClass</h4>
  2644. <pre>@Deprecated
  2645. public final&nbsp;java.lang.Class&lt;?&gt;&nbsp;toClass&#8203;(java.lang.ClassLoader&nbsp;loader)
  2646. throws <a href="../javassist/CannotCompileException.html" title="class in javassist">CannotCompileException</a></pre>
  2647. <div class="deprecationBlock"><span class="deprecatedLabel">Deprecated.</span>
  2648. <div class="deprecationComment">Replaced by <a href="../javassist/CtClass.html#toClass-java.lang.ClassLoader-java.security.ProtectionDomain-"><code>toClass(ClassLoader,ProtectionDomain)</code></a></div>
  2649. </div>
  2650. <div class="block">Converts this class to a <code>java.lang.Class</code> object.
  2651. <p><b>Warining:</b> A Class object returned by this method may not
  2652. work with a security manager or a signed jar file because a
  2653. protection domain is not specified.</div>
  2654. <dl>
  2655. <dt><span class="throwsLabel">Throws:</span></dt>
  2656. <dd><code><a href="../javassist/CannotCompileException.html" title="class in javassist">CannotCompileException</a></code></dd>
  2657. </dl>
  2658. </li>
  2659. </ul>
  2660. <a name="detach--">
  2661. <!-- -->
  2662. </a>
  2663. <ul class="blockList">
  2664. <li class="blockList">
  2665. <h4>detach</h4>
  2666. <pre>public&nbsp;void&nbsp;detach()</pre>
  2667. <div class="block">Removes this <code>CtClass</code> object from the
  2668. <code>ClassPool</code>.
  2669. After this method is called, any method cannot be called on the
  2670. removed <code>CtClass</code> object.
  2671. <p>If <code>get()</code> in <code>ClassPool</code> is called
  2672. with the name of the removed method,
  2673. the <code>ClassPool</code> will read the class file again
  2674. and constructs another <code>CtClass</code> object representing
  2675. the same class.</div>
  2676. </li>
  2677. </ul>
  2678. <a name="stopPruning-boolean-">
  2679. <!-- -->
  2680. </a>
  2681. <ul class="blockList">
  2682. <li class="blockList">
  2683. <h4>stopPruning</h4>
  2684. <pre>public&nbsp;boolean&nbsp;stopPruning&#8203;(boolean&nbsp;stop)</pre>
  2685. <div class="block">Disallows (or allows) automatically pruning this <code>CtClass</code>
  2686. object.
  2687. <p>
  2688. Javassist can automatically prune a <code>CtClass</code> object
  2689. when <code>toBytecode()</code> (or <code>toClass()</code>,
  2690. <code>writeFile()</code>) is called.
  2691. Since a <code>ClassPool</code> holds all instances of <code>CtClass</code>
  2692. even after <code>toBytecode()</code> (or <code>toClass()</code>,
  2693. <code>writeFile()</code>) is called, pruning may significantly
  2694. save memory consumption.
  2695. <p>If <code>ClassPool.doPruning</code> is true, the automatic pruning
  2696. is on by default. Otherwise, it is off. The default value of
  2697. <code>ClassPool.doPruning</code> is false.</div>
  2698. <dl>
  2699. <dt><span class="paramLabel">Parameters:</span></dt>
  2700. <dd><code>stop</code> - disallow pruning if true. Otherwise, allow.</dd>
  2701. <dt><span class="returnLabel">Returns:</span></dt>
  2702. <dd>the previous status of pruning. true if pruning is already stopped.</dd>
  2703. <dt><span class="seeLabel">See Also:</span></dt>
  2704. <dd><a href="../javassist/CtClass.html#detach--"><code>detach()</code></a>,
  2705. <a href="../javassist/CtClass.html#prune--"><code>prune()</code></a>,
  2706. <a href="../javassist/ClassPool.html#doPruning"><code>ClassPool.doPruning</code></a></dd>
  2707. </dl>
  2708. </li>
  2709. </ul>
  2710. <a name="prune--">
  2711. <!-- -->
  2712. </a>
  2713. <ul class="blockList">
  2714. <li class="blockList">
  2715. <h4>prune</h4>
  2716. <pre>public&nbsp;void&nbsp;prune()</pre>
  2717. <div class="block">Discards unnecessary attributes, in particular,
  2718. <code>CodeAttribute</code>s (method bodies) of the class,
  2719. to minimize the memory footprint.
  2720. After calling this method, the class is read only.
  2721. It cannot be modified any more.
  2722. Furthermore, <code>toBytecode()</code>,
  2723. <code>writeFile()</code>, <code>toClass()</code>,
  2724. or <code>instrument()</code> cannot be called.
  2725. However, the method names and signatures in the class etc.
  2726. are still accessible.
  2727. <p><code>toBytecode()</code>, <code>writeFile()</code>, and
  2728. <code>toClass()</code> internally call this method if
  2729. automatic pruning is on.
  2730. <p>According to some experiments, pruning does not really reduce
  2731. memory consumption. Only about 20%. Since pruning takes time,
  2732. it might not pay off. So the automatic pruning is off by default.</div>
  2733. <dl>
  2734. <dt><span class="seeLabel">See Also:</span></dt>
  2735. <dd><a href="../javassist/CtClass.html#stopPruning-boolean-"><code>stopPruning(boolean)</code></a>,
  2736. <a href="../javassist/CtClass.html#detach--"><code>detach()</code></a>,
  2737. <a href="../javassist/ClassPool.html#doPruning"><code>ClassPool.doPruning</code></a>,
  2738. <a href="../javassist/CtClass.html#toBytecode--"><code>toBytecode()</code></a>,
  2739. <a href="../javassist/CtClass.html#toClass--"><code>toClass()</code></a>,
  2740. <a href="../javassist/CtClass.html#writeFile--"><code>writeFile()</code></a>,
  2741. <a href="../javassist/CtClass.html#instrument-javassist.CodeConverter-"><code>instrument(CodeConverter)</code></a>,
  2742. <a href="../javassist/CtClass.html#instrument-javassist.expr.ExprEditor-"><code>instrument(ExprEditor)</code></a></dd>
  2743. </dl>
  2744. </li>
  2745. </ul>
  2746. <a name="rebuildClassFile--">
  2747. <!-- -->
  2748. </a>
  2749. <ul class="blockList">
  2750. <li class="blockList">
  2751. <h4>rebuildClassFile</h4>
  2752. <pre>public&nbsp;void&nbsp;rebuildClassFile()</pre>
  2753. <div class="block">If this method is called, the class file will be
  2754. rebuilt when it is finally generated by
  2755. <code>toBytecode()</code> and <code>writeFile()</code>.
  2756. For a performance reason, the symbol table of the
  2757. class file may contain unused entries, for example,
  2758. after a method or a filed is deleted.
  2759. This method
  2760. removes those unused entries. This removal will
  2761. minimize the size of the class file.</div>
  2762. <dl>
  2763. <dt><span class="simpleTagLabel">Since:</span></dt>
  2764. <dd>3.8.1</dd>
  2765. </dl>
  2766. </li>
  2767. </ul>
  2768. <a name="toBytecode--">
  2769. <!-- -->
  2770. </a>
  2771. <ul class="blockList">
  2772. <li class="blockList">
  2773. <h4>toBytecode</h4>
  2774. <pre>public&nbsp;byte[]&nbsp;toBytecode()
  2775. throws java.io.IOException,
  2776. <a href="../javassist/CannotCompileException.html" title="class in javassist">CannotCompileException</a></pre>
  2777. <div class="block">Converts this class to a class file.
  2778. Once this method is called, further modifications are not
  2779. possible any more.</div>
  2780. <dl>
  2781. <dt><span class="returnLabel">Returns:</span></dt>
  2782. <dd>the contents of the class file.</dd>
  2783. <dt><span class="throwsLabel">Throws:</span></dt>
  2784. <dd><code>java.io.IOException</code></dd>
  2785. <dd><code><a href="../javassist/CannotCompileException.html" title="class in javassist">CannotCompileException</a></code></dd>
  2786. </dl>
  2787. </li>
  2788. </ul>
  2789. <a name="writeFile--">
  2790. <!-- -->
  2791. </a>
  2792. <ul class="blockList">
  2793. <li class="blockList">
  2794. <h4>writeFile</h4>
  2795. <pre>public&nbsp;void&nbsp;writeFile()
  2796. throws <a href="../javassist/NotFoundException.html" title="class in javassist">NotFoundException</a>,
  2797. java.io.IOException,
  2798. <a href="../javassist/CannotCompileException.html" title="class in javassist">CannotCompileException</a></pre>
  2799. <div class="block">Writes a class file represented by this <code>CtClass</code>
  2800. object in the current directory.
  2801. Once this method is called, further modifications are not
  2802. possible any more.</div>
  2803. <dl>
  2804. <dt><span class="throwsLabel">Throws:</span></dt>
  2805. <dd><code><a href="../javassist/NotFoundException.html" title="class in javassist">NotFoundException</a></code></dd>
  2806. <dd><code>java.io.IOException</code></dd>
  2807. <dd><code><a href="../javassist/CannotCompileException.html" title="class in javassist">CannotCompileException</a></code></dd>
  2808. <dt><span class="seeLabel">See Also:</span></dt>
  2809. <dd><a href="../javassist/CtClass.html#debugWriteFile--"><code>debugWriteFile()</code></a></dd>
  2810. </dl>
  2811. </li>
  2812. </ul>
  2813. <a name="writeFile-java.lang.String-">
  2814. <!-- -->
  2815. </a>
  2816. <ul class="blockList">
  2817. <li class="blockList">
  2818. <h4>writeFile</h4>
  2819. <pre>public&nbsp;void&nbsp;writeFile&#8203;(java.lang.String&nbsp;directoryName)
  2820. throws <a href="../javassist/CannotCompileException.html" title="class in javassist">CannotCompileException</a>,
  2821. java.io.IOException</pre>
  2822. <div class="block">Writes a class file represented by this <code>CtClass</code>
  2823. object on a local disk.
  2824. Once this method is called, further modifications are not
  2825. possible any more.</div>
  2826. <dl>
  2827. <dt><span class="paramLabel">Parameters:</span></dt>
  2828. <dd><code>directoryName</code> - it must end without a directory separator.</dd>
  2829. <dt><span class="throwsLabel">Throws:</span></dt>
  2830. <dd><code><a href="../javassist/CannotCompileException.html" title="class in javassist">CannotCompileException</a></code></dd>
  2831. <dd><code>java.io.IOException</code></dd>
  2832. <dt><span class="seeLabel">See Also:</span></dt>
  2833. <dd><a href="../javassist/CtClass.html#debugWriteFile-java.lang.String-"><code>debugWriteFile(String)</code></a></dd>
  2834. </dl>
  2835. </li>
  2836. </ul>
  2837. <a name="debugWriteFile--">
  2838. <!-- -->
  2839. </a>
  2840. <ul class="blockList">
  2841. <li class="blockList">
  2842. <h4>debugWriteFile</h4>
  2843. <pre>public&nbsp;void&nbsp;debugWriteFile()</pre>
  2844. <div class="block">Writes a class file as <code>writeFile()</code> does although this
  2845. method does not prune or freeze the class after writing the class
  2846. file. Note that, once <code>writeFile()</code> or <code>toBytecode()</code>
  2847. is called, it cannot be called again since the class is pruned and frozen.
  2848. This method would be useful for debugging.</div>
  2849. </li>
  2850. </ul>
  2851. <a name="debugWriteFile-java.lang.String-">
  2852. <!-- -->
  2853. </a>
  2854. <ul class="blockList">
  2855. <li class="blockList">
  2856. <h4>debugWriteFile</h4>
  2857. <pre>public&nbsp;void&nbsp;debugWriteFile&#8203;(java.lang.String&nbsp;directoryName)</pre>
  2858. <div class="block">Writes a class file as <code>writeFile()</code> does although this
  2859. method does not prune or freeze the class after writing the class
  2860. file. Note that, once <code>writeFile()</code> or <code>toBytecode()</code>
  2861. is called, it cannot be called again since the class is pruned and frozen.
  2862. This method would be useful for debugging.</div>
  2863. <dl>
  2864. <dt><span class="paramLabel">Parameters:</span></dt>
  2865. <dd><code>directoryName</code> - it must end without a directory separator.</dd>
  2866. </dl>
  2867. </li>
  2868. </ul>
  2869. <a name="toBytecode-java.io.DataOutputStream-">
  2870. <!-- -->
  2871. </a>
  2872. <ul class="blockList">
  2873. <li class="blockList">
  2874. <h4>toBytecode</h4>
  2875. <pre>public&nbsp;void&nbsp;toBytecode&#8203;(java.io.DataOutputStream&nbsp;out)
  2876. throws <a href="../javassist/CannotCompileException.html" title="class in javassist">CannotCompileException</a>,
  2877. java.io.IOException</pre>
  2878. <div class="block">Converts this class to a class file.
  2879. Once this method is called, further modifications are not
  2880. possible any more.
  2881. <p>This method dose not close the output stream in the end.</div>
  2882. <dl>
  2883. <dt><span class="paramLabel">Parameters:</span></dt>
  2884. <dd><code>out</code> - the output stream that a class file is written to.</dd>
  2885. <dt><span class="throwsLabel">Throws:</span></dt>
  2886. <dd><code><a href="../javassist/CannotCompileException.html" title="class in javassist">CannotCompileException</a></code></dd>
  2887. <dd><code>java.io.IOException</code></dd>
  2888. </dl>
  2889. </li>
  2890. </ul>
  2891. <a name="makeUniqueName-java.lang.String-">
  2892. <!-- -->
  2893. </a>
  2894. <ul class="blockListLast">
  2895. <li class="blockList">
  2896. <h4>makeUniqueName</h4>
  2897. <pre>public&nbsp;java.lang.String&nbsp;makeUniqueName&#8203;(java.lang.String&nbsp;prefix)</pre>
  2898. <div class="block">Makes a unique member name. This method guarantees that
  2899. the returned name is not used as a prefix of any methods
  2900. or fields visible in this class.
  2901. If the returned name is XYZ, then any method or field names
  2902. in this class do not start with XYZ.</div>
  2903. <dl>
  2904. <dt><span class="paramLabel">Parameters:</span></dt>
  2905. <dd><code>prefix</code> - the prefix of the member name.</dd>
  2906. </dl>
  2907. </li>
  2908. </ul>
  2909. </li>
  2910. </ul>
  2911. </li>
  2912. </ul>
  2913. </div>
  2914. </div>
  2915. <!-- ========= END OF CLASS DATA ========= -->
  2916. <!-- ======= START OF BOTTOM NAVBAR ====== -->
  2917. <div class="bottomNav"><a name="navbar.bottom">
  2918. <!-- -->
  2919. </a>
  2920. <div class="skipNav"><a href="#skip.navbar.bottom" title="Skip navigation links">Skip navigation links</a></div>
  2921. <a name="navbar.bottom.firstrow">
  2922. <!-- -->
  2923. </a>
  2924. <ul class="navList" title="Navigation">
  2925. <li><a href="../overview-summary.html">Overview</a></li>
  2926. <li><a href="package-summary.html">Package</a></li>
  2927. <li class="navBarCell1Rev">Class</li>
  2928. <li><a href="class-use/CtClass.html">Use</a></li>
  2929. <li><a href="package-tree.html">Tree</a></li>
  2930. <li><a href="../deprecated-list.html">Deprecated</a></li>
  2931. <li><a href="../index-all.html">Index</a></li>
  2932. </ul>
  2933. </div>
  2934. <div class="subNav">
  2935. <ul class="navList">
  2936. <li><a href="../javassist/CtBehavior.html" title="class in javassist"><span class="typeNameLink">Prev&nbsp;Class</span></a></li>
  2937. <li><a href="../javassist/CtConstructor.html" title="class in javassist"><span class="typeNameLink">Next&nbsp;Class</span></a></li>
  2938. </ul>
  2939. <ul class="navList">
  2940. <li><a href="../index.html?javassist/CtClass.html" target="_top">Frames</a></li>
  2941. <li><a href="CtClass.html" target="_top">No&nbsp;Frames</a></li>
  2942. </ul>
  2943. <ul class="navList" id="allclasses_navbar_bottom">
  2944. <li><a href="../allclasses-noframe.html">All&nbsp;Classes</a></li>
  2945. </ul>
  2946. <div>
  2947. <script type="text/javascript"><!--
  2948. allClassesLink = document.getElementById("allclasses_navbar_bottom");
  2949. if(window==top) {
  2950. allClassesLink.style.display = "block";
  2951. }
  2952. else {
  2953. allClassesLink.style.display = "none";
  2954. }
  2955. //-->
  2956. </script>
  2957. <noscript>
  2958. <div>JavaScript is disabled on your browser.</div>
  2959. </noscript>
  2960. </div>
  2961. <div>
  2962. <ul class="subNavList">
  2963. <li>Summary:&nbsp;</li>
  2964. <li>Nested&nbsp;|&nbsp;</li>
  2965. <li><a href="#field.summary">Field</a>&nbsp;|&nbsp;</li>
  2966. <li>Constr&nbsp;|&nbsp;</li>
  2967. <li><a href="#method.summary">Method</a></li>
  2968. </ul>
  2969. <ul class="subNavList">
  2970. <li>Detail:&nbsp;</li>
  2971. <li><a href="#field.detail">Field</a>&nbsp;|&nbsp;</li>
  2972. <li>Constr&nbsp;|&nbsp;</li>
  2973. <li><a href="#method.detail">Method</a></li>
  2974. </ul>
  2975. </div>
  2976. <a name="skip.navbar.bottom">
  2977. <!-- -->
  2978. </a></div>
  2979. <!-- ======== END OF BOTTOM NAVBAR ======= -->
  2980. <p class="legalCopy"><small><i>Javassist, a Java-bytecode translator toolkit.<br>
  2981. Copyright (C) 1999- Shigeru Chiba. All Rights Reserved.</i></small></p>
  2982. </body>
  2983. </html>