123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647 |
- <!DOCTYPE HTML>
- <!-- NewPage -->
- <html lang="en">
- <head>
- <!-- Generated by javadoc (11) on Sat May 08 11:16:00 JST 2021 -->
- <title>CtMember (Javassist API)</title>
- <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
- <meta name="dc.created" content="2021-05-08">
- <link rel="stylesheet" type="text/css" href="../stylesheet.css" title="Style">
- <link rel="stylesheet" type="text/css" href="../jquery/jquery-ui.css" title="Style">
- <script type="text/javascript" src="../script.js"></script>
- <script type="text/javascript" src="../jquery/jszip/dist/jszip.min.js"></script>
- <script type="text/javascript" src="../jquery/jszip-utils/dist/jszip-utils.min.js"></script>
- <!--[if IE]>
- <script type="text/javascript" src="../jquery/jszip-utils/dist/jszip-utils-ie.min.js"></script>
- <![endif]-->
- <script type="text/javascript" src="../jquery/jquery-3.3.1.js"></script>
- <script type="text/javascript" src="../jquery/jquery-migrate-3.0.1.js"></script>
- <script type="text/javascript" src="../jquery/jquery-ui.js"></script>
- </head>
- <body>
- <script type="text/javascript"><!--
- try {
- if (location.href.indexOf('is-external=true') == -1) {
- parent.document.title="CtMember (Javassist API)";
- }
- }
- catch(err) {
- }
- //-->
- 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};
- var tabs = {65535:["t0","All Methods"],2:["t2","Instance Methods"],4:["t3","Abstract Methods"],8:["t4","Concrete Methods"]};
- var altColor = "altColor";
- var rowColor = "rowColor";
- var tableTab = "tableTab";
- var activeTableTab = "activeTableTab";
- var pathtoroot = "../";
- var useModuleDirectories = true;
- loadScripts(document, 'script');</script>
- <noscript>
- <div>JavaScript is disabled on your browser.</div>
- </noscript>
- <header role="banner">
- <nav role="navigation">
- <div class="fixedNav">
- <!-- ========= START OF TOP NAVBAR ======= -->
- <div class="topNav"><a id="navbar.top">
- <!-- -->
- </a>
- <div class="skipNav"><a href="#skip.navbar.top" title="Skip navigation links">Skip navigation links</a></div>
- <a id="navbar.top.firstrow">
- <!-- -->
- </a>
- <ul class="navList" title="Navigation">
- <li><a href="../index.html">Overview</a></li>
- <li><a href="package-summary.html">Package</a></li>
- <li class="navBarCell1Rev">Class</li>
- <li><a href="class-use/CtMember.html">Use</a></li>
- <li><a href="package-tree.html">Tree</a></li>
- <li><a href="../deprecated-list.html">Deprecated</a></li>
- <li><a href="../index-all.html">Index</a></li>
- </ul>
- </div>
- <div class="subNav">
- <ul class="navList" id="allclasses_navbar_top">
- <li><a href="../allclasses.html">All Classes</a></li>
- </ul>
- <ul class="navListSearch">
- <li><label for="search">SEARCH:</label>
- <input type="text" id="search" value="search" disabled="disabled">
- <input type="reset" id="reset" value="reset" disabled="disabled">
- </li>
- </ul>
- <div>
- <script type="text/javascript"><!--
- allClassesLink = document.getElementById("allclasses_navbar_top");
- if(window==top) {
- allClassesLink.style.display = "block";
- }
- else {
- allClassesLink.style.display = "none";
- }
- //-->
- </script>
- <noscript>
- <div>JavaScript is disabled on your browser.</div>
- </noscript>
- </div>
- <div>
- <ul class="subNavList">
- <li>Summary: </li>
- <li>Nested | </li>
- <li>Field | </li>
- <li>Constr | </li>
- <li><a href="#method.summary">Method</a></li>
- </ul>
- <ul class="subNavList">
- <li>Detail: </li>
- <li>Field | </li>
- <li>Constr | </li>
- <li><a href="#method.detail">Method</a></li>
- </ul>
- </div>
- <a id="skip.navbar.top">
- <!-- -->
- </a></div>
- <!-- ========= END OF TOP NAVBAR ========= -->
- </div>
- <div class="navPadding"> </div>
- <script type="text/javascript"><!--
- $('.navPadding').css('padding-top', $('.fixedNav').css("height"));
- //-->
- </script>
- </nav>
- </header>
- <!-- ======== START OF CLASS DATA ======== -->
- <main role="main">
- <div class="header">
- <div class="subTitle"><span class="packageLabelInType">Package</span> <a href="package-summary.html">javassist</a></div>
- <h2 title="Class CtMember" class="title">Class CtMember</h2>
- </div>
- <div class="contentContainer">
- <ul class="inheritance">
- <li>java.lang.Object</li>
- <li>
- <ul class="inheritance">
- <li>javassist.CtMember</li>
- </ul>
- </li>
- </ul>
- <div class="description">
- <ul class="blockList">
- <li class="blockList">
- <dl>
- <dt>Direct Known Subclasses:</dt>
- <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>
- </dl>
- <hr>
- <pre>public abstract class <span class="typeNameLabel">CtMember</span>
- extends java.lang.Object</pre>
- <div class="block">An instance of <code>CtMember</code> represents a field, a constructor,
- or a method.</div>
- </li>
- </ul>
- </div>
- <div class="summary">
- <ul class="blockList">
- <li class="blockList">
- <!-- ========== METHOD SUMMARY =========== -->
- <section role="region">
- <ul class="blockList">
- <li class="blockList"><a id="method.summary">
- <!-- -->
- </a>
- <h3>Method Summary</h3>
- <table class="memberSummary">
- <caption><span id="t0" class="activeTableTab"><span>All Methods</span><span class="tabEnd"> </span></span><span id="t2" class="tableTab"><span><a href="javascript:show(2);">Instance Methods</a></span><span class="tabEnd"> </span></span><span id="t3" class="tableTab"><span><a href="javascript:show(4);">Abstract Methods</a></span><span class="tabEnd"> </span></span><span id="t4" class="tableTab"><span><a href="javascript:show(8);">Concrete Methods</a></span><span class="tabEnd"> </span></span></caption>
- <tr>
- <th class="colFirst" scope="col">Modifier and Type</th>
- <th class="colSecond" scope="col">Method</th>
- <th class="colLast" scope="col">Description</th>
- </tr>
- <tr id="i0" class="altColor">
- <td class="colFirst"><code>abstract java.lang.Object</code></td>
- <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getAnnotation(java.lang.Class)">getAnnotation</a></span>​(java.lang.Class<?> annotationType)</code></th>
- <td class="colLast">
- <div class="block">Returns the annotation if the class has the specified annotation type.</div>
- </td>
- </tr>
- <tr id="i1" class="rowColor">
- <td class="colFirst"><code>abstract java.lang.Object[]</code></td>
- <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getAnnotations()">getAnnotations</a></span>()</code></th>
- <td class="colLast">
- <div class="block">Returns the annotations associated with this member.</div>
- </td>
- </tr>
- <tr id="i2" class="altColor">
- <td class="colFirst"><code>abstract byte[]</code></td>
- <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getAttribute(java.lang.String)">getAttribute</a></span>​(java.lang.String name)</code></th>
- <td class="colLast">
- <div class="block">Obtains a user-defined attribute with the given name.</div>
- </td>
- </tr>
- <tr id="i3" class="rowColor">
- <td class="colFirst"><code>abstract java.lang.Object[]</code></td>
- <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getAvailableAnnotations()">getAvailableAnnotations</a></span>()</code></th>
- <td class="colLast">
- <div class="block">Returns the annotations associated with this member.</div>
- </td>
- </tr>
- <tr id="i4" class="altColor">
- <td class="colFirst"><code><a href="CtClass.html" title="class in javassist">CtClass</a></code></td>
- <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getDeclaringClass()">getDeclaringClass</a></span>()</code></th>
- <td class="colLast">
- <div class="block">Returns the class that declares this member.</div>
- </td>
- </tr>
- <tr id="i5" class="rowColor">
- <td class="colFirst"><code>abstract java.lang.String</code></td>
- <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getGenericSignature()">getGenericSignature</a></span>()</code></th>
- <td class="colLast">
- <div class="block">Returns the generic signature of the member.</div>
- </td>
- </tr>
- <tr id="i6" class="altColor">
- <td class="colFirst"><code>abstract int</code></td>
- <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getModifiers()">getModifiers</a></span>()</code></th>
- <td class="colLast">
- <div class="block">Obtains the modifiers of the member.</div>
- </td>
- </tr>
- <tr id="i7" class="rowColor">
- <td class="colFirst"><code>abstract java.lang.String</code></td>
- <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getName()">getName</a></span>()</code></th>
- <td class="colLast">
- <div class="block">Obtains the name of the member.</div>
- </td>
- </tr>
- <tr id="i8" class="altColor">
- <td class="colFirst"><code>abstract java.lang.String</code></td>
- <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getSignature()">getSignature</a></span>()</code></th>
- <td class="colLast">
- <div class="block">Returns the character string representing the signature of the member.</div>
- </td>
- </tr>
- <tr id="i9" class="rowColor">
- <td class="colFirst"><code>boolean</code></td>
- <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#hasAnnotation(java.lang.Class)">hasAnnotation</a></span>​(java.lang.Class<?> clz)</code></th>
- <td class="colLast">
- <div class="block">Returns true if the class has the specified annotation type.</div>
- </td>
- </tr>
- <tr id="i10" class="altColor">
- <td class="colFirst"><code>abstract boolean</code></td>
- <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#hasAnnotation(java.lang.String)">hasAnnotation</a></span>​(java.lang.String annotationTypeName)</code></th>
- <td class="colLast">
- <div class="block">Returns true if the class has the specified annotation type.</div>
- </td>
- </tr>
- <tr id="i11" class="rowColor">
- <td class="colFirst"><code>abstract void</code></td>
- <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#setAttribute(java.lang.String,byte%5B%5D)">setAttribute</a></span>​(java.lang.String name,
- byte[] data)</code></th>
- <td class="colLast">
- <div class="block">Adds a user-defined attribute.</div>
- </td>
- </tr>
- <tr id="i12" class="altColor">
- <td class="colFirst"><code>abstract void</code></td>
- <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#setGenericSignature(java.lang.String)">setGenericSignature</a></span>​(java.lang.String sig)</code></th>
- <td class="colLast">
- <div class="block">Sets the generic signature of the member.</div>
- </td>
- </tr>
- <tr id="i13" class="rowColor">
- <td class="colFirst"><code>abstract void</code></td>
- <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#setModifiers(int)">setModifiers</a></span>​(int mod)</code></th>
- <td class="colLast">
- <div class="block">Sets the encoded modifiers of the member.</div>
- </td>
- </tr>
- <tr id="i14" class="altColor">
- <td class="colFirst"><code>java.lang.String</code></td>
- <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#toString()">toString</a></span>()</code></th>
- <td class="colLast"> </td>
- </tr>
- <tr id="i15" class="rowColor">
- <td class="colFirst"><code>boolean</code></td>
- <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#visibleFrom(javassist.CtClass)">visibleFrom</a></span>​(<a href="CtClass.html" title="class in javassist">CtClass</a> clazz)</code></th>
- <td class="colLast">
- <div class="block">Returns true if this member is accessible from the given class.</div>
- </td>
- </tr>
- </table>
- <ul class="blockList">
- <li class="blockList"><a id="methods.inherited.from.class.java.lang.Object">
- <!-- -->
- </a>
- <h3>Methods inherited from class java.lang.Object</h3>
- <code>equals, getClass, hashCode, notify, notifyAll, wait, wait, wait</code></li>
- </ul>
- </li>
- </ul>
- </section>
- </li>
- </ul>
- </div>
- <div class="details">
- <ul class="blockList">
- <li class="blockList">
- <!-- ============ METHOD DETAIL ========== -->
- <section role="region">
- <ul class="blockList">
- <li class="blockList"><a id="method.detail">
- <!-- -->
- </a>
- <h3>Method Detail</h3>
- <a id="toString()">
- <!-- -->
- </a>
- <ul class="blockList">
- <li class="blockList">
- <h4>toString</h4>
- <pre class="methodSignature">public java.lang.String toString()</pre>
- <dl>
- <dt><span class="overrideSpecifyLabel">Overrides:</span></dt>
- <dd><code>toString</code> in class <code>java.lang.Object</code></dd>
- </dl>
- </li>
- </ul>
- <a id="getDeclaringClass()">
- <!-- -->
- </a>
- <ul class="blockList">
- <li class="blockList">
- <h4>getDeclaringClass</h4>
- <pre class="methodSignature">public <a href="CtClass.html" title="class in javassist">CtClass</a> getDeclaringClass()</pre>
- <div class="block">Returns the class that declares this member.</div>
- </li>
- </ul>
- <a id="visibleFrom(javassist.CtClass)">
- <!-- -->
- </a>
- <ul class="blockList">
- <li class="blockList">
- <h4>visibleFrom</h4>
- <pre class="methodSignature">public boolean visibleFrom​(<a href="CtClass.html" title="class in javassist">CtClass</a> clazz)</pre>
- <div class="block">Returns true if this member is accessible from the given class.</div>
- </li>
- </ul>
- <a id="getModifiers()">
- <!-- -->
- </a>
- <ul class="blockList">
- <li class="blockList">
- <h4>getModifiers</h4>
- <pre class="methodSignature">public abstract int getModifiers()</pre>
- <div class="block">Obtains the modifiers of the member.</div>
- <dl>
- <dt><span class="returnLabel">Returns:</span></dt>
- <dd>modifiers encoded with
- <code>javassist.Modifier</code>.</dd>
- <dt><span class="seeLabel">See Also:</span></dt>
- <dd><a href="Modifier.html" title="class in javassist"><code>Modifier</code></a></dd>
- </dl>
- </li>
- </ul>
- <a id="setModifiers(int)">
- <!-- -->
- </a>
- <ul class="blockList">
- <li class="blockList">
- <h4>setModifiers</h4>
- <pre class="methodSignature">public abstract void setModifiers​(int mod)</pre>
- <div class="block">Sets the encoded modifiers of the member.</div>
- <dl>
- <dt><span class="seeLabel">See Also:</span></dt>
- <dd><a href="Modifier.html" title="class in javassist"><code>Modifier</code></a></dd>
- </dl>
- </li>
- </ul>
- <a id="hasAnnotation(java.lang.Class)">
- <!-- -->
- </a>
- <ul class="blockList">
- <li class="blockList">
- <h4>hasAnnotation</h4>
- <pre class="methodSignature">public boolean hasAnnotation​(java.lang.Class<?> clz)</pre>
- <div class="block">Returns true if the class has the specified annotation type.</div>
- <dl>
- <dt><span class="paramLabel">Parameters:</span></dt>
- <dd><code>clz</code> - the annotation type.</dd>
- <dt><span class="returnLabel">Returns:</span></dt>
- <dd><code>true</code> if the annotation is found, otherwise <code>false</code>.</dd>
- <dt><span class="simpleTagLabel">Since:</span></dt>
- <dd>3.11</dd>
- </dl>
- </li>
- </ul>
- <a id="hasAnnotation(java.lang.String)">
- <!-- -->
- </a>
- <ul class="blockList">
- <li class="blockList">
- <h4>hasAnnotation</h4>
- <pre class="methodSignature">public abstract boolean hasAnnotation​(java.lang.String annotationTypeName)</pre>
- <div class="block">Returns true if the class has the specified annotation type.</div>
- <dl>
- <dt><span class="paramLabel">Parameters:</span></dt>
- <dd><code>annotationTypeName</code> - the name of annotation type.</dd>
- <dt><span class="returnLabel">Returns:</span></dt>
- <dd><code>true</code> if the annotation is found, otherwise <code>false</code>.</dd>
- <dt><span class="simpleTagLabel">Since:</span></dt>
- <dd>3.21</dd>
- </dl>
- </li>
- </ul>
- <a id="getAnnotation(java.lang.Class)">
- <!-- -->
- </a>
- <ul class="blockList">
- <li class="blockList">
- <h4>getAnnotation</h4>
- <pre class="methodSignature">public abstract java.lang.Object getAnnotation​(java.lang.Class<?> annotationType)
- throws java.lang.ClassNotFoundException</pre>
- <div class="block">Returns the annotation if the class has the specified annotation type.
- For example, if an annotation <code>@Author</code> is associated
- with this member, an <code>Author</code> object is returned.
- The member values can be obtained by calling methods on
- the <code>Author</code> object.</div>
- <dl>
- <dt><span class="paramLabel">Parameters:</span></dt>
- <dd><code>annotationType</code> - the annotation type.</dd>
- <dt><span class="returnLabel">Returns:</span></dt>
- <dd>the annotation if found, otherwise <code>null</code>.</dd>
- <dt><span class="throwsLabel">Throws:</span></dt>
- <dd><code>java.lang.ClassNotFoundException</code></dd>
- <dt><span class="simpleTagLabel">Since:</span></dt>
- <dd>3.11</dd>
- </dl>
- </li>
- </ul>
- <a id="getAnnotations()">
- <!-- -->
- </a>
- <ul class="blockList">
- <li class="blockList">
- <h4>getAnnotations</h4>
- <pre class="methodSignature">public abstract java.lang.Object[] getAnnotations()
- throws java.lang.ClassNotFoundException</pre>
- <div class="block">Returns the annotations associated with this member.
- For example, if an annotation <code>@Author</code> is associated
- with this member, the returned array contains an <code>Author</code>
- object. The member values can be obtained by calling methods on
- the <code>Author</code> object.</div>
- <dl>
- <dt><span class="returnLabel">Returns:</span></dt>
- <dd>an array of annotation-type objects.</dd>
- <dt><span class="throwsLabel">Throws:</span></dt>
- <dd><code>java.lang.ClassNotFoundException</code></dd>
- <dt><span class="seeLabel">See Also:</span></dt>
- <dd><a href="CtClass.html#getAnnotations()"><code>CtClass.getAnnotations()</code></a></dd>
- </dl>
- </li>
- </ul>
- <a id="getAvailableAnnotations()">
- <!-- -->
- </a>
- <ul class="blockList">
- <li class="blockList">
- <h4>getAvailableAnnotations</h4>
- <pre class="methodSignature">public abstract java.lang.Object[] getAvailableAnnotations()</pre>
- <div class="block">Returns the annotations associated with this member.
- This method is equivalent to <code>getAnnotations()</code>
- except that, if any annotations are not on the classpath,
- they are not included in the returned array.</div>
- <dl>
- <dt><span class="returnLabel">Returns:</span></dt>
- <dd>an array of annotation-type objects.</dd>
- <dt><span class="simpleTagLabel">Since:</span></dt>
- <dd>3.3</dd>
- <dt><span class="seeLabel">See Also:</span></dt>
- <dd><a href="#getAnnotations()"><code>getAnnotations()</code></a>,
- <a href="CtClass.html#getAvailableAnnotations()"><code>CtClass.getAvailableAnnotations()</code></a></dd>
- </dl>
- </li>
- </ul>
- <a id="getName()">
- <!-- -->
- </a>
- <ul class="blockList">
- <li class="blockList">
- <h4>getName</h4>
- <pre class="methodSignature">public abstract java.lang.String getName()</pre>
- <div class="block">Obtains the name of the member.
-
- <p>As for constructor names, see <code>getName()</code>
- in <code>CtConstructor</code>.</div>
- <dl>
- <dt><span class="seeLabel">See Also:</span></dt>
- <dd><a href="CtConstructor.html#getName()"><code>CtConstructor.getName()</code></a></dd>
- </dl>
- </li>
- </ul>
- <a id="getSignature()">
- <!-- -->
- </a>
- <ul class="blockList">
- <li class="blockList">
- <h4>getSignature</h4>
- <pre class="methodSignature">public abstract java.lang.String getSignature()</pre>
- <div class="block">Returns the character string representing the signature of the member.
- If two members have the same signature (parameter types etc.),
- <code>getSignature()</code> returns the same string.</div>
- </li>
- </ul>
- <a id="getGenericSignature()">
- <!-- -->
- </a>
- <ul class="blockList">
- <li class="blockList">
- <h4>getGenericSignature</h4>
- <pre class="methodSignature">public abstract java.lang.String getGenericSignature()</pre>
- <div class="block">Returns the generic signature of the member.</div>
- <dl>
- <dt><span class="simpleTagLabel">Since:</span></dt>
- <dd>3.17</dd>
- <dt><span class="seeLabel">See Also:</span></dt>
- <dd><a href="bytecode/SignatureAttribute.html#toFieldSignature(java.lang.String)"><code>SignatureAttribute.toFieldSignature(String)</code></a>,
- <a href="bytecode/SignatureAttribute.html#toMethodSignature(java.lang.String)"><code>SignatureAttribute.toMethodSignature(String)</code></a>,
- <a href="CtClass.html#getGenericSignature()"><code>CtClass.getGenericSignature()</code></a></dd>
- </dl>
- </li>
- </ul>
- <a id="setGenericSignature(java.lang.String)">
- <!-- -->
- </a>
- <ul class="blockList">
- <li class="blockList">
- <h4>setGenericSignature</h4>
- <pre class="methodSignature">public abstract void setGenericSignature​(java.lang.String sig)</pre>
- <div class="block">Sets the generic signature of the member.</div>
- <dl>
- <dt><span class="paramLabel">Parameters:</span></dt>
- <dd><code>sig</code> - a new generic signature.</dd>
- <dt><span class="simpleTagLabel">Since:</span></dt>
- <dd>3.17</dd>
- <dt><span class="seeLabel">See Also:</span></dt>
- <dd><a href="bytecode/SignatureAttribute.ObjectType.html#encode()"><code>SignatureAttribute.ObjectType.encode()</code></a>,
- <a href="bytecode/SignatureAttribute.MethodSignature.html#encode()"><code>SignatureAttribute.MethodSignature.encode()</code></a>,
- <a href="CtClass.html#setGenericSignature(java.lang.String)"><code>CtClass.setGenericSignature(String)</code></a></dd>
- </dl>
- </li>
- </ul>
- <a id="getAttribute(java.lang.String)">
- <!-- -->
- </a>
- <ul class="blockList">
- <li class="blockList">
- <h4>getAttribute</h4>
- <pre class="methodSignature">public abstract byte[] getAttribute​(java.lang.String name)</pre>
- <div class="block">Obtains a user-defined attribute with the given name.
- If that attribute is not found in the class file, this
- method returns null.
-
- <p>Note that an attribute is a data block specified by
- the class file format.
- See <a href="bytecode/AttributeInfo.html" title="class in javassist.bytecode"><code>AttributeInfo</code></a>.</div>
- <dl>
- <dt><span class="paramLabel">Parameters:</span></dt>
- <dd><code>name</code> - attribute name</dd>
- </dl>
- </li>
- </ul>
- <a id="setAttribute(java.lang.String,byte[])">
- <!-- -->
- </a>
- <ul class="blockListLast">
- <li class="blockList">
- <h4>setAttribute</h4>
- <pre class="methodSignature">public abstract void setAttribute​(java.lang.String name,
- byte[] data)</pre>
- <div class="block">Adds a user-defined attribute. The attribute is saved in the class file.
-
- <p>Note that an attribute is a data block specified by
- the class file format.
- See <a href="bytecode/AttributeInfo.html" title="class in javassist.bytecode"><code>AttributeInfo</code></a>.</div>
- <dl>
- <dt><span class="paramLabel">Parameters:</span></dt>
- <dd><code>name</code> - attribute name</dd>
- <dd><code>data</code> - attribute value</dd>
- </dl>
- </li>
- </ul>
- </li>
- </ul>
- </section>
- </li>
- </ul>
- </div>
- </div>
- </main>
- <!-- ========= END OF CLASS DATA ========= -->
- <footer role="contentinfo">
- <nav role="navigation">
- <!-- ======= START OF BOTTOM NAVBAR ====== -->
- <div class="bottomNav"><a id="navbar.bottom">
- <!-- -->
- </a>
- <div class="skipNav"><a href="#skip.navbar.bottom" title="Skip navigation links">Skip navigation links</a></div>
- <a id="navbar.bottom.firstrow">
- <!-- -->
- </a>
- <ul class="navList" title="Navigation">
- <li><a href="../index.html">Overview</a></li>
- <li><a href="package-summary.html">Package</a></li>
- <li class="navBarCell1Rev">Class</li>
- <li><a href="class-use/CtMember.html">Use</a></li>
- <li><a href="package-tree.html">Tree</a></li>
- <li><a href="../deprecated-list.html">Deprecated</a></li>
- <li><a href="../index-all.html">Index</a></li>
- </ul>
- </div>
- <div class="subNav">
- <ul class="navList" id="allclasses_navbar_bottom">
- <li><a href="../allclasses.html">All Classes</a></li>
- </ul>
- <div>
- <script type="text/javascript"><!--
- allClassesLink = document.getElementById("allclasses_navbar_bottom");
- if(window==top) {
- allClassesLink.style.display = "block";
- }
- else {
- allClassesLink.style.display = "none";
- }
- //-->
- </script>
- <noscript>
- <div>JavaScript is disabled on your browser.</div>
- </noscript>
- </div>
- <div>
- <ul class="subNavList">
- <li>Summary: </li>
- <li>Nested | </li>
- <li>Field | </li>
- <li>Constr | </li>
- <li><a href="#method.summary">Method</a></li>
- </ul>
- <ul class="subNavList">
- <li>Detail: </li>
- <li>Field | </li>
- <li>Constr | </li>
- <li><a href="#method.detail">Method</a></li>
- </ul>
- </div>
- <a id="skip.navbar.bottom">
- <!-- -->
- </a></div>
- <!-- ======== END OF BOTTOM NAVBAR ======= -->
- </nav>
- <p class="legalCopy"><small><i>Javassist, a Java-bytecode translator toolkit.<br>
- Copyright (C) 1999- Shigeru Chiba. All Rights Reserved.</i></small></p>
- </footer>
- </body>
- </html>
|