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.

CtMember.html 24KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647
  1. <!DOCTYPE HTML>
  2. <!-- NewPage -->
  3. <html lang="en">
  4. <head>
  5. <!-- Generated by javadoc (11) on Sat May 08 11:16:00 JST 2021 -->
  6. <title>CtMember (Javassist API)</title>
  7. <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
  8. <meta name="dc.created" content="2021-05-08">
  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-3.3.1.js"></script>
  18. <script type="text/javascript" src="../jquery/jquery-migrate-3.0.1.js"></script>
  19. <script type="text/javascript" src="../jquery/jquery-ui.js"></script>
  20. </head>
  21. <body>
  22. <script type="text/javascript"><!--
  23. try {
  24. if (location.href.indexOf('is-external=true') == -1) {
  25. parent.document.title="CtMember (Javassist API)";
  26. }
  27. }
  28. catch(err) {
  29. }
  30. //-->
  31. var data = {"i0":6,"i1":6,"i2":6,"i3":6,"i4":10,"i5":6,"i6":6,"i7":6,"i8":6,"i9":10,"i10":6,"i11":6,"i12":6,"i13":6,"i14":10,"i15":10};
  32. var tabs = {65535:["t0","All Methods"],2:["t2","Instance Methods"],4:["t3","Abstract Methods"],8:["t4","Concrete Methods"]};
  33. var altColor = "altColor";
  34. var rowColor = "rowColor";
  35. var tableTab = "tableTab";
  36. var activeTableTab = "activeTableTab";
  37. var pathtoroot = "../";
  38. var useModuleDirectories = true;
  39. loadScripts(document, 'script');</script>
  40. <noscript>
  41. <div>JavaScript is disabled on your browser.</div>
  42. </noscript>
  43. <header role="banner">
  44. <nav role="navigation">
  45. <div class="fixedNav">
  46. <!-- ========= START OF TOP NAVBAR ======= -->
  47. <div class="topNav"><a id="navbar.top">
  48. <!-- -->
  49. </a>
  50. <div class="skipNav"><a href="#skip.navbar.top" title="Skip navigation links">Skip navigation links</a></div>
  51. <a id="navbar.top.firstrow">
  52. <!-- -->
  53. </a>
  54. <ul class="navList" title="Navigation">
  55. <li><a href="../index.html">Overview</a></li>
  56. <li><a href="package-summary.html">Package</a></li>
  57. <li class="navBarCell1Rev">Class</li>
  58. <li><a href="class-use/CtMember.html">Use</a></li>
  59. <li><a href="package-tree.html">Tree</a></li>
  60. <li><a href="../deprecated-list.html">Deprecated</a></li>
  61. <li><a href="../index-all.html">Index</a></li>
  62. </ul>
  63. </div>
  64. <div class="subNav">
  65. <ul class="navList" id="allclasses_navbar_top">
  66. <li><a href="../allclasses.html">All&nbsp;Classes</a></li>
  67. </ul>
  68. <ul class="navListSearch">
  69. <li><label for="search">SEARCH:</label>
  70. <input type="text" id="search" value="search" disabled="disabled">
  71. <input type="reset" id="reset" value="reset" disabled="disabled">
  72. </li>
  73. </ul>
  74. <div>
  75. <script type="text/javascript"><!--
  76. allClassesLink = document.getElementById("allclasses_navbar_top");
  77. if(window==top) {
  78. allClassesLink.style.display = "block";
  79. }
  80. else {
  81. allClassesLink.style.display = "none";
  82. }
  83. //-->
  84. </script>
  85. <noscript>
  86. <div>JavaScript is disabled on your browser.</div>
  87. </noscript>
  88. </div>
  89. <div>
  90. <ul class="subNavList">
  91. <li>Summary:&nbsp;</li>
  92. <li>Nested&nbsp;|&nbsp;</li>
  93. <li>Field&nbsp;|&nbsp;</li>
  94. <li>Constr&nbsp;|&nbsp;</li>
  95. <li><a href="#method.summary">Method</a></li>
  96. </ul>
  97. <ul class="subNavList">
  98. <li>Detail:&nbsp;</li>
  99. <li>Field&nbsp;|&nbsp;</li>
  100. <li>Constr&nbsp;|&nbsp;</li>
  101. <li><a href="#method.detail">Method</a></li>
  102. </ul>
  103. </div>
  104. <a id="skip.navbar.top">
  105. <!-- -->
  106. </a></div>
  107. <!-- ========= END OF TOP NAVBAR ========= -->
  108. </div>
  109. <div class="navPadding">&nbsp;</div>
  110. <script type="text/javascript"><!--
  111. $('.navPadding').css('padding-top', $('.fixedNav').css("height"));
  112. //-->
  113. </script>
  114. </nav>
  115. </header>
  116. <!-- ======== START OF CLASS DATA ======== -->
  117. <main role="main">
  118. <div class="header">
  119. <div class="subTitle"><span class="packageLabelInType">Package</span>&nbsp;<a href="package-summary.html">javassist</a></div>
  120. <h2 title="Class CtMember" class="title">Class CtMember</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.CtMember</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="CtBehavior.html" title="class in javassist">CtBehavior</a></code>, <code><a href="CtField.html" title="class in javassist">CtField</a></code></dd>
  137. </dl>
  138. <hr>
  139. <pre>public abstract class <span class="typeNameLabel">CtMember</span>
  140. extends java.lang.Object</pre>
  141. <div class="block">An instance of <code>CtMember</code> represents a field, a constructor,
  142. or a method.</div>
  143. </li>
  144. </ul>
  145. </div>
  146. <div class="summary">
  147. <ul class="blockList">
  148. <li class="blockList">
  149. <!-- ========== METHOD SUMMARY =========== -->
  150. <section role="region">
  151. <ul class="blockList">
  152. <li class="blockList"><a id="method.summary">
  153. <!-- -->
  154. </a>
  155. <h3>Method Summary</h3>
  156. <table class="memberSummary">
  157. <caption><span id="t0" class="activeTableTab"><span>All Methods</span><span class="tabEnd">&nbsp;</span></span><span id="t2" class="tableTab"><span><a href="javascript:show(2);">Instance Methods</a></span><span class="tabEnd">&nbsp;</span></span><span id="t3" class="tableTab"><span><a href="javascript:show(4);">Abstract Methods</a></span><span class="tabEnd">&nbsp;</span></span><span id="t4" class="tableTab"><span><a href="javascript:show(8);">Concrete Methods</a></span><span class="tabEnd">&nbsp;</span></span></caption>
  158. <tr>
  159. <th class="colFirst" scope="col">Modifier and Type</th>
  160. <th class="colSecond" scope="col">Method</th>
  161. <th class="colLast" scope="col">Description</th>
  162. </tr>
  163. <tr id="i0" class="altColor">
  164. <td class="colFirst"><code>abstract java.lang.Object</code></td>
  165. <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getAnnotation(java.lang.Class)">getAnnotation</a></span>&#8203;(java.lang.Class&lt;?&gt;&nbsp;annotationType)</code></th>
  166. <td class="colLast">
  167. <div class="block">Returns the annotation if the class has the specified annotation type.</div>
  168. </td>
  169. </tr>
  170. <tr id="i1" class="rowColor">
  171. <td class="colFirst"><code>abstract java.lang.Object[]</code></td>
  172. <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getAnnotations()">getAnnotations</a></span>()</code></th>
  173. <td class="colLast">
  174. <div class="block">Returns the annotations associated with this member.</div>
  175. </td>
  176. </tr>
  177. <tr id="i2" class="altColor">
  178. <td class="colFirst"><code>abstract byte[]</code></td>
  179. <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getAttribute(java.lang.String)">getAttribute</a></span>&#8203;(java.lang.String&nbsp;name)</code></th>
  180. <td class="colLast">
  181. <div class="block">Obtains a user-defined attribute with the given name.</div>
  182. </td>
  183. </tr>
  184. <tr id="i3" class="rowColor">
  185. <td class="colFirst"><code>abstract java.lang.Object[]</code></td>
  186. <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getAvailableAnnotations()">getAvailableAnnotations</a></span>()</code></th>
  187. <td class="colLast">
  188. <div class="block">Returns the annotations associated with this member.</div>
  189. </td>
  190. </tr>
  191. <tr id="i4" class="altColor">
  192. <td class="colFirst"><code><a href="CtClass.html" title="class in javassist">CtClass</a></code></td>
  193. <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getDeclaringClass()">getDeclaringClass</a></span>()</code></th>
  194. <td class="colLast">
  195. <div class="block">Returns the class that declares this member.</div>
  196. </td>
  197. </tr>
  198. <tr id="i5" class="rowColor">
  199. <td class="colFirst"><code>abstract java.lang.String</code></td>
  200. <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getGenericSignature()">getGenericSignature</a></span>()</code></th>
  201. <td class="colLast">
  202. <div class="block">Returns the generic signature of the member.</div>
  203. </td>
  204. </tr>
  205. <tr id="i6" class="altColor">
  206. <td class="colFirst"><code>abstract int</code></td>
  207. <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getModifiers()">getModifiers</a></span>()</code></th>
  208. <td class="colLast">
  209. <div class="block">Obtains the modifiers of the member.</div>
  210. </td>
  211. </tr>
  212. <tr id="i7" class="rowColor">
  213. <td class="colFirst"><code>abstract java.lang.String</code></td>
  214. <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getName()">getName</a></span>()</code></th>
  215. <td class="colLast">
  216. <div class="block">Obtains the name of the member.</div>
  217. </td>
  218. </tr>
  219. <tr id="i8" class="altColor">
  220. <td class="colFirst"><code>abstract java.lang.String</code></td>
  221. <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getSignature()">getSignature</a></span>()</code></th>
  222. <td class="colLast">
  223. <div class="block">Returns the character string representing the signature of the member.</div>
  224. </td>
  225. </tr>
  226. <tr id="i9" class="rowColor">
  227. <td class="colFirst"><code>boolean</code></td>
  228. <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#hasAnnotation(java.lang.Class)">hasAnnotation</a></span>&#8203;(java.lang.Class&lt;?&gt;&nbsp;clz)</code></th>
  229. <td class="colLast">
  230. <div class="block">Returns true if the class has the specified annotation type.</div>
  231. </td>
  232. </tr>
  233. <tr id="i10" class="altColor">
  234. <td class="colFirst"><code>abstract boolean</code></td>
  235. <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#hasAnnotation(java.lang.String)">hasAnnotation</a></span>&#8203;(java.lang.String&nbsp;annotationTypeName)</code></th>
  236. <td class="colLast">
  237. <div class="block">Returns true if the class has the specified annotation type.</div>
  238. </td>
  239. </tr>
  240. <tr id="i11" class="rowColor">
  241. <td class="colFirst"><code>abstract void</code></td>
  242. <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#setAttribute(java.lang.String,byte%5B%5D)">setAttribute</a></span>&#8203;(java.lang.String&nbsp;name,
  243. byte[]&nbsp;data)</code></th>
  244. <td class="colLast">
  245. <div class="block">Adds a user-defined attribute.</div>
  246. </td>
  247. </tr>
  248. <tr id="i12" class="altColor">
  249. <td class="colFirst"><code>abstract void</code></td>
  250. <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#setGenericSignature(java.lang.String)">setGenericSignature</a></span>&#8203;(java.lang.String&nbsp;sig)</code></th>
  251. <td class="colLast">
  252. <div class="block">Sets the generic signature of the member.</div>
  253. </td>
  254. </tr>
  255. <tr id="i13" class="rowColor">
  256. <td class="colFirst"><code>abstract void</code></td>
  257. <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#setModifiers(int)">setModifiers</a></span>&#8203;(int&nbsp;mod)</code></th>
  258. <td class="colLast">
  259. <div class="block">Sets the encoded modifiers of the member.</div>
  260. </td>
  261. </tr>
  262. <tr id="i14" class="altColor">
  263. <td class="colFirst"><code>java.lang.String</code></td>
  264. <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#toString()">toString</a></span>()</code></th>
  265. <td class="colLast">&nbsp;</td>
  266. </tr>
  267. <tr id="i15" class="rowColor">
  268. <td class="colFirst"><code>boolean</code></td>
  269. <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#visibleFrom(javassist.CtClass)">visibleFrom</a></span>&#8203;(<a href="CtClass.html" title="class in javassist">CtClass</a>&nbsp;clazz)</code></th>
  270. <td class="colLast">
  271. <div class="block">Returns true if this member is accessible from the given class.</div>
  272. </td>
  273. </tr>
  274. </table>
  275. <ul class="blockList">
  276. <li class="blockList"><a id="methods.inherited.from.class.java.lang.Object">
  277. <!-- -->
  278. </a>
  279. <h3>Methods inherited from class&nbsp;java.lang.Object</h3>
  280. <code>equals, getClass, hashCode, notify, notifyAll, wait, wait, wait</code></li>
  281. </ul>
  282. </li>
  283. </ul>
  284. </section>
  285. </li>
  286. </ul>
  287. </div>
  288. <div class="details">
  289. <ul class="blockList">
  290. <li class="blockList">
  291. <!-- ============ METHOD DETAIL ========== -->
  292. <section role="region">
  293. <ul class="blockList">
  294. <li class="blockList"><a id="method.detail">
  295. <!-- -->
  296. </a>
  297. <h3>Method Detail</h3>
  298. <a id="toString()">
  299. <!-- -->
  300. </a>
  301. <ul class="blockList">
  302. <li class="blockList">
  303. <h4>toString</h4>
  304. <pre class="methodSignature">public&nbsp;java.lang.String&nbsp;toString()</pre>
  305. <dl>
  306. <dt><span class="overrideSpecifyLabel">Overrides:</span></dt>
  307. <dd><code>toString</code>&nbsp;in class&nbsp;<code>java.lang.Object</code></dd>
  308. </dl>
  309. </li>
  310. </ul>
  311. <a id="getDeclaringClass()">
  312. <!-- -->
  313. </a>
  314. <ul class="blockList">
  315. <li class="blockList">
  316. <h4>getDeclaringClass</h4>
  317. <pre class="methodSignature">public&nbsp;<a href="CtClass.html" title="class in javassist">CtClass</a>&nbsp;getDeclaringClass()</pre>
  318. <div class="block">Returns the class that declares this member.</div>
  319. </li>
  320. </ul>
  321. <a id="visibleFrom(javassist.CtClass)">
  322. <!-- -->
  323. </a>
  324. <ul class="blockList">
  325. <li class="blockList">
  326. <h4>visibleFrom</h4>
  327. <pre class="methodSignature">public&nbsp;boolean&nbsp;visibleFrom&#8203;(<a href="CtClass.html" title="class in javassist">CtClass</a>&nbsp;clazz)</pre>
  328. <div class="block">Returns true if this member is accessible from the given class.</div>
  329. </li>
  330. </ul>
  331. <a id="getModifiers()">
  332. <!-- -->
  333. </a>
  334. <ul class="blockList">
  335. <li class="blockList">
  336. <h4>getModifiers</h4>
  337. <pre class="methodSignature">public abstract&nbsp;int&nbsp;getModifiers()</pre>
  338. <div class="block">Obtains the modifiers of the member.</div>
  339. <dl>
  340. <dt><span class="returnLabel">Returns:</span></dt>
  341. <dd>modifiers encoded with
  342. <code>javassist.Modifier</code>.</dd>
  343. <dt><span class="seeLabel">See Also:</span></dt>
  344. <dd><a href="Modifier.html" title="class in javassist"><code>Modifier</code></a></dd>
  345. </dl>
  346. </li>
  347. </ul>
  348. <a id="setModifiers(int)">
  349. <!-- -->
  350. </a>
  351. <ul class="blockList">
  352. <li class="blockList">
  353. <h4>setModifiers</h4>
  354. <pre class="methodSignature">public abstract&nbsp;void&nbsp;setModifiers&#8203;(int&nbsp;mod)</pre>
  355. <div class="block">Sets the encoded modifiers of the member.</div>
  356. <dl>
  357. <dt><span class="seeLabel">See Also:</span></dt>
  358. <dd><a href="Modifier.html" title="class in javassist"><code>Modifier</code></a></dd>
  359. </dl>
  360. </li>
  361. </ul>
  362. <a id="hasAnnotation(java.lang.Class)">
  363. <!-- -->
  364. </a>
  365. <ul class="blockList">
  366. <li class="blockList">
  367. <h4>hasAnnotation</h4>
  368. <pre class="methodSignature">public&nbsp;boolean&nbsp;hasAnnotation&#8203;(java.lang.Class&lt;?&gt;&nbsp;clz)</pre>
  369. <div class="block">Returns true if the class has the specified annotation type.</div>
  370. <dl>
  371. <dt><span class="paramLabel">Parameters:</span></dt>
  372. <dd><code>clz</code> - the annotation type.</dd>
  373. <dt><span class="returnLabel">Returns:</span></dt>
  374. <dd><code>true</code> if the annotation is found, otherwise <code>false</code>.</dd>
  375. <dt><span class="simpleTagLabel">Since:</span></dt>
  376. <dd>3.11</dd>
  377. </dl>
  378. </li>
  379. </ul>
  380. <a id="hasAnnotation(java.lang.String)">
  381. <!-- -->
  382. </a>
  383. <ul class="blockList">
  384. <li class="blockList">
  385. <h4>hasAnnotation</h4>
  386. <pre class="methodSignature">public abstract&nbsp;boolean&nbsp;hasAnnotation&#8203;(java.lang.String&nbsp;annotationTypeName)</pre>
  387. <div class="block">Returns true if the class has the specified annotation type.</div>
  388. <dl>
  389. <dt><span class="paramLabel">Parameters:</span></dt>
  390. <dd><code>annotationTypeName</code> - the name of annotation type.</dd>
  391. <dt><span class="returnLabel">Returns:</span></dt>
  392. <dd><code>true</code> if the annotation is found, otherwise <code>false</code>.</dd>
  393. <dt><span class="simpleTagLabel">Since:</span></dt>
  394. <dd>3.21</dd>
  395. </dl>
  396. </li>
  397. </ul>
  398. <a id="getAnnotation(java.lang.Class)">
  399. <!-- -->
  400. </a>
  401. <ul class="blockList">
  402. <li class="blockList">
  403. <h4>getAnnotation</h4>
  404. <pre class="methodSignature">public abstract&nbsp;java.lang.Object&nbsp;getAnnotation&#8203;(java.lang.Class&lt;?&gt;&nbsp;annotationType)
  405. throws java.lang.ClassNotFoundException</pre>
  406. <div class="block">Returns the annotation if the class has the specified annotation type.
  407. For example, if an annotation <code>@Author</code> is associated
  408. with this member, an <code>Author</code> object is returned.
  409. The member values can be obtained by calling methods on
  410. the <code>Author</code> object.</div>
  411. <dl>
  412. <dt><span class="paramLabel">Parameters:</span></dt>
  413. <dd><code>annotationType</code> - the annotation type.</dd>
  414. <dt><span class="returnLabel">Returns:</span></dt>
  415. <dd>the annotation if found, otherwise <code>null</code>.</dd>
  416. <dt><span class="throwsLabel">Throws:</span></dt>
  417. <dd><code>java.lang.ClassNotFoundException</code></dd>
  418. <dt><span class="simpleTagLabel">Since:</span></dt>
  419. <dd>3.11</dd>
  420. </dl>
  421. </li>
  422. </ul>
  423. <a id="getAnnotations()">
  424. <!-- -->
  425. </a>
  426. <ul class="blockList">
  427. <li class="blockList">
  428. <h4>getAnnotations</h4>
  429. <pre class="methodSignature">public abstract&nbsp;java.lang.Object[]&nbsp;getAnnotations()
  430. throws java.lang.ClassNotFoundException</pre>
  431. <div class="block">Returns the annotations associated with this member.
  432. For example, if an annotation <code>@Author</code> is associated
  433. with this member, the returned array contains an <code>Author</code>
  434. object. The member values can be obtained by calling methods on
  435. the <code>Author</code> object.</div>
  436. <dl>
  437. <dt><span class="returnLabel">Returns:</span></dt>
  438. <dd>an array of annotation-type objects.</dd>
  439. <dt><span class="throwsLabel">Throws:</span></dt>
  440. <dd><code>java.lang.ClassNotFoundException</code></dd>
  441. <dt><span class="seeLabel">See Also:</span></dt>
  442. <dd><a href="CtClass.html#getAnnotations()"><code>CtClass.getAnnotations()</code></a></dd>
  443. </dl>
  444. </li>
  445. </ul>
  446. <a id="getAvailableAnnotations()">
  447. <!-- -->
  448. </a>
  449. <ul class="blockList">
  450. <li class="blockList">
  451. <h4>getAvailableAnnotations</h4>
  452. <pre class="methodSignature">public abstract&nbsp;java.lang.Object[]&nbsp;getAvailableAnnotations()</pre>
  453. <div class="block">Returns the annotations associated with this member.
  454. This method is equivalent to <code>getAnnotations()</code>
  455. except that, if any annotations are not on the classpath,
  456. they are not included in the returned array.</div>
  457. <dl>
  458. <dt><span class="returnLabel">Returns:</span></dt>
  459. <dd>an array of annotation-type objects.</dd>
  460. <dt><span class="simpleTagLabel">Since:</span></dt>
  461. <dd>3.3</dd>
  462. <dt><span class="seeLabel">See Also:</span></dt>
  463. <dd><a href="#getAnnotations()"><code>getAnnotations()</code></a>,
  464. <a href="CtClass.html#getAvailableAnnotations()"><code>CtClass.getAvailableAnnotations()</code></a></dd>
  465. </dl>
  466. </li>
  467. </ul>
  468. <a id="getName()">
  469. <!-- -->
  470. </a>
  471. <ul class="blockList">
  472. <li class="blockList">
  473. <h4>getName</h4>
  474. <pre class="methodSignature">public abstract&nbsp;java.lang.String&nbsp;getName()</pre>
  475. <div class="block">Obtains the name of the member.
  476. <p>As for constructor names, see <code>getName()</code>
  477. in <code>CtConstructor</code>.</div>
  478. <dl>
  479. <dt><span class="seeLabel">See Also:</span></dt>
  480. <dd><a href="CtConstructor.html#getName()"><code>CtConstructor.getName()</code></a></dd>
  481. </dl>
  482. </li>
  483. </ul>
  484. <a id="getSignature()">
  485. <!-- -->
  486. </a>
  487. <ul class="blockList">
  488. <li class="blockList">
  489. <h4>getSignature</h4>
  490. <pre class="methodSignature">public abstract&nbsp;java.lang.String&nbsp;getSignature()</pre>
  491. <div class="block">Returns the character string representing the signature of the member.
  492. If two members have the same signature (parameter types etc.),
  493. <code>getSignature()</code> returns the same string.</div>
  494. </li>
  495. </ul>
  496. <a id="getGenericSignature()">
  497. <!-- -->
  498. </a>
  499. <ul class="blockList">
  500. <li class="blockList">
  501. <h4>getGenericSignature</h4>
  502. <pre class="methodSignature">public abstract&nbsp;java.lang.String&nbsp;getGenericSignature()</pre>
  503. <div class="block">Returns the generic signature of the member.</div>
  504. <dl>
  505. <dt><span class="simpleTagLabel">Since:</span></dt>
  506. <dd>3.17</dd>
  507. <dt><span class="seeLabel">See Also:</span></dt>
  508. <dd><a href="bytecode/SignatureAttribute.html#toFieldSignature(java.lang.String)"><code>SignatureAttribute.toFieldSignature(String)</code></a>,
  509. <a href="bytecode/SignatureAttribute.html#toMethodSignature(java.lang.String)"><code>SignatureAttribute.toMethodSignature(String)</code></a>,
  510. <a href="CtClass.html#getGenericSignature()"><code>CtClass.getGenericSignature()</code></a></dd>
  511. </dl>
  512. </li>
  513. </ul>
  514. <a id="setGenericSignature(java.lang.String)">
  515. <!-- -->
  516. </a>
  517. <ul class="blockList">
  518. <li class="blockList">
  519. <h4>setGenericSignature</h4>
  520. <pre class="methodSignature">public abstract&nbsp;void&nbsp;setGenericSignature&#8203;(java.lang.String&nbsp;sig)</pre>
  521. <div class="block">Sets the generic signature of the member.</div>
  522. <dl>
  523. <dt><span class="paramLabel">Parameters:</span></dt>
  524. <dd><code>sig</code> - a new generic signature.</dd>
  525. <dt><span class="simpleTagLabel">Since:</span></dt>
  526. <dd>3.17</dd>
  527. <dt><span class="seeLabel">See Also:</span></dt>
  528. <dd><a href="bytecode/SignatureAttribute.ObjectType.html#encode()"><code>SignatureAttribute.ObjectType.encode()</code></a>,
  529. <a href="bytecode/SignatureAttribute.MethodSignature.html#encode()"><code>SignatureAttribute.MethodSignature.encode()</code></a>,
  530. <a href="CtClass.html#setGenericSignature(java.lang.String)"><code>CtClass.setGenericSignature(String)</code></a></dd>
  531. </dl>
  532. </li>
  533. </ul>
  534. <a id="getAttribute(java.lang.String)">
  535. <!-- -->
  536. </a>
  537. <ul class="blockList">
  538. <li class="blockList">
  539. <h4>getAttribute</h4>
  540. <pre class="methodSignature">public abstract&nbsp;byte[]&nbsp;getAttribute&#8203;(java.lang.String&nbsp;name)</pre>
  541. <div class="block">Obtains a user-defined attribute with the given name.
  542. If that attribute is not found in the class file, this
  543. method returns null.
  544. <p>Note that an attribute is a data block specified by
  545. the class file format.
  546. See <a href="bytecode/AttributeInfo.html" title="class in javassist.bytecode"><code>AttributeInfo</code></a>.</div>
  547. <dl>
  548. <dt><span class="paramLabel">Parameters:</span></dt>
  549. <dd><code>name</code> - attribute name</dd>
  550. </dl>
  551. </li>
  552. </ul>
  553. <a id="setAttribute(java.lang.String,byte[])">
  554. <!-- -->
  555. </a>
  556. <ul class="blockListLast">
  557. <li class="blockList">
  558. <h4>setAttribute</h4>
  559. <pre class="methodSignature">public abstract&nbsp;void&nbsp;setAttribute&#8203;(java.lang.String&nbsp;name,
  560. byte[]&nbsp;data)</pre>
  561. <div class="block">Adds a user-defined attribute. The attribute is saved in the class file.
  562. <p>Note that an attribute is a data block specified by
  563. the class file format.
  564. See <a href="bytecode/AttributeInfo.html" title="class in javassist.bytecode"><code>AttributeInfo</code></a>.</div>
  565. <dl>
  566. <dt><span class="paramLabel">Parameters:</span></dt>
  567. <dd><code>name</code> - attribute name</dd>
  568. <dd><code>data</code> - attribute value</dd>
  569. </dl>
  570. </li>
  571. </ul>
  572. </li>
  573. </ul>
  574. </section>
  575. </li>
  576. </ul>
  577. </div>
  578. </div>
  579. </main>
  580. <!-- ========= END OF CLASS DATA ========= -->
  581. <footer role="contentinfo">
  582. <nav role="navigation">
  583. <!-- ======= START OF BOTTOM NAVBAR ====== -->
  584. <div class="bottomNav"><a id="navbar.bottom">
  585. <!-- -->
  586. </a>
  587. <div class="skipNav"><a href="#skip.navbar.bottom" title="Skip navigation links">Skip navigation links</a></div>
  588. <a id="navbar.bottom.firstrow">
  589. <!-- -->
  590. </a>
  591. <ul class="navList" title="Navigation">
  592. <li><a href="../index.html">Overview</a></li>
  593. <li><a href="package-summary.html">Package</a></li>
  594. <li class="navBarCell1Rev">Class</li>
  595. <li><a href="class-use/CtMember.html">Use</a></li>
  596. <li><a href="package-tree.html">Tree</a></li>
  597. <li><a href="../deprecated-list.html">Deprecated</a></li>
  598. <li><a href="../index-all.html">Index</a></li>
  599. </ul>
  600. </div>
  601. <div class="subNav">
  602. <ul class="navList" id="allclasses_navbar_bottom">
  603. <li><a href="../allclasses.html">All&nbsp;Classes</a></li>
  604. </ul>
  605. <div>
  606. <script type="text/javascript"><!--
  607. allClassesLink = document.getElementById("allclasses_navbar_bottom");
  608. if(window==top) {
  609. allClassesLink.style.display = "block";
  610. }
  611. else {
  612. allClassesLink.style.display = "none";
  613. }
  614. //-->
  615. </script>
  616. <noscript>
  617. <div>JavaScript is disabled on your browser.</div>
  618. </noscript>
  619. </div>
  620. <div>
  621. <ul class="subNavList">
  622. <li>Summary:&nbsp;</li>
  623. <li>Nested&nbsp;|&nbsp;</li>
  624. <li>Field&nbsp;|&nbsp;</li>
  625. <li>Constr&nbsp;|&nbsp;</li>
  626. <li><a href="#method.summary">Method</a></li>
  627. </ul>
  628. <ul class="subNavList">
  629. <li>Detail:&nbsp;</li>
  630. <li>Field&nbsp;|&nbsp;</li>
  631. <li>Constr&nbsp;|&nbsp;</li>
  632. <li><a href="#method.detail">Method</a></li>
  633. </ul>
  634. </div>
  635. <a id="skip.navbar.bottom">
  636. <!-- -->
  637. </a></div>
  638. <!-- ======== END OF BOTTOM NAVBAR ======= -->
  639. </nav>
  640. <p class="legalCopy"><small><i>Javassist, a Java-bytecode translator toolkit.<br>
  641. Copyright (C) 1999- Shigeru Chiba. All Rights Reserved.</i></small></p>
  642. </footer>
  643. </body>
  644. </html>