123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992 |
- <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
- <!-- NewPage -->
- <html lang="en">
- <head>
- <!-- Generated by javadoc (10.0.1) on Thu Jun 21 01:52:55 JST 2018 -->
- <title>Descriptor (Javassist API)</title>
- <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
- <meta name="date" content="2018-06-21">
- <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-1.10.2.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="Descriptor (Javassist API)";
- }
- }
- catch(err) {
- }
- //-->
- var methods = {"i0":9,"i1":9,"i2":9,"i3":9,"i4":9,"i5":9,"i6":9,"i7":9,"i8":9,"i9":9,"i10":9,"i11":9,"i12":9,"i13":9,"i14":9,"i15":9,"i16":9,"i17":9,"i18":9,"i19":9,"i20":9,"i21":9,"i22":9,"i23":9,"i24":9,"i25":9,"i26":9};
- var tabs = {65535:["t0","All Methods"],1:["t1","Static Methods"],8:["t4","Concrete Methods"]};
- var altColor = "altColor";
- var rowColor = "rowColor";
- var tableTab = "tableTab";
- var activeTableTab = "activeTableTab";
- var pathtoroot = "../../";loadScripts(document, 'script');</script>
- <noscript>
- <div>JavaScript is disabled on your browser.</div>
- </noscript>
- <div class="fixedNav">
- <!-- ========= START OF TOP NAVBAR ======= -->
- <div class="topNav"><a name="navbar.top">
- <!-- -->
- </a>
- <div class="skipNav"><a href="#skip.navbar.top" title="Skip navigation links">Skip navigation links</a></div>
- <a name="navbar.top.firstrow">
- <!-- -->
- </a>
- <ul class="navList" title="Navigation">
- <li><a href="../../overview-summary.html">Overview</a></li>
- <li><a href="package-summary.html">Package</a></li>
- <li class="navBarCell1Rev">Class</li>
- <li><a href="class-use/Descriptor.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">
- <li><a href="../../javassist/bytecode/DeprecatedAttribute.html" title="class in javassist.bytecode"><span class="typeNameLink">Prev Class</span></a></li>
- <li><a href="../../javassist/bytecode/Descriptor.Iterator.html" title="class in javassist.bytecode"><span class="typeNameLink">Next Class</span></a></li>
- </ul>
- <ul class="navList">
- <li><a href="../../index.html?javassist/bytecode/Descriptor.html" target="_top">Frames</a></li>
- <li><a href="Descriptor.html" target="_top">No Frames</a></li>
- </ul>
- <ul class="navList" id="allclasses_navbar_top">
- <li><a href="../../allclasses-noframe.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><a href="#nested.class.summary">Nested</a> | </li>
- <li>Field | </li>
- <li><a href="#constructor.summary">Constr</a> | </li>
- <li><a href="#method.summary">Method</a></li>
- </ul>
- <ul class="subNavList">
- <li>Detail: </li>
- <li>Field | </li>
- <li><a href="#constructor.detail">Constr</a> | </li>
- <li><a href="#method.detail">Method</a></li>
- </ul>
- </div>
- <a name="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>
- <!-- ======== START OF CLASS DATA ======== -->
- <div class="header">
- <div class="subTitle"><span class="packageLabelInType">Package</span> <a href="../../javassist/bytecode/package-summary.html">javassist.bytecode</a></div>
- <h2 title="Class Descriptor" class="title">Class Descriptor</h2>
- </div>
- <div class="contentContainer">
- <ul class="inheritance">
- <li>java.lang.Object</li>
- <li>
- <ul class="inheritance">
- <li>javassist.bytecode.Descriptor</li>
- </ul>
- </li>
- </ul>
- <div class="description">
- <ul class="blockList">
- <li class="blockList">
- <hr>
- <pre>public class <span class="typeNameLabel">Descriptor</span>
- extends java.lang.Object</pre>
- <div class="block">A support class for dealing with descriptors.
-
- <p>See chapter 4.3 in "The Java Virtual Machine Specification (2nd ed.)"</div>
- </li>
- </ul>
- </div>
- <div class="summary">
- <ul class="blockList">
- <li class="blockList">
- <!-- ======== NESTED CLASS SUMMARY ======== -->
- <ul class="blockList">
- <li class="blockList"><a name="nested.class.summary">
- <!-- -->
- </a>
- <h3>Nested Class Summary</h3>
- <table class="memberSummary" summary="Nested Class Summary table, listing nested classes, and an explanation">
- <caption><span>Nested Classes</span><span class="tabEnd"> </span></caption>
- <tr>
- <th class="colFirst" scope="col">Modifier and Type</th>
- <th class="colSecond" scope="col">Class</th>
- <th class="colLast" scope="col">Description</th>
- </tr>
- <tr class="altColor">
- <td class="colFirst"><code>static class </code></td>
- <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="../../javassist/bytecode/Descriptor.Iterator.html" title="class in javassist.bytecode">Descriptor.Iterator</a></span></code></th>
- <td class="colLast">
- <div class="block">An Iterator over a descriptor.</div>
- </td>
- </tr>
- </table>
- </li>
- </ul>
- <!-- ======== CONSTRUCTOR SUMMARY ======== -->
- <ul class="blockList">
- <li class="blockList"><a name="constructor.summary">
- <!-- -->
- </a>
- <h3>Constructor Summary</h3>
- <table class="memberSummary" summary="Constructor Summary table, listing constructors, and an explanation">
- <caption><span>Constructors</span><span class="tabEnd"> </span></caption>
- <tr>
- <th class="colFirst" scope="col">Constructor</th>
- <th class="colLast" scope="col">Description</th>
- </tr>
- <tr class="altColor">
- <th class="colConstructorName" scope="row"><code><span class="memberNameLink"><a href="../../javassist/bytecode/Descriptor.html#Descriptor--">Descriptor</a></span>()</code></th>
- <td class="colLast"> </td>
- </tr>
- </table>
- </li>
- </ul>
- <!-- ========== METHOD SUMMARY =========== -->
- <ul class="blockList">
- <li class="blockList"><a name="method.summary">
- <!-- -->
- </a>
- <h3>Method Summary</h3>
- <table class="memberSummary" summary="Method Summary table, listing methods, and an explanation">
- <caption><span id="t0" class="activeTableTab"><span>All Methods</span><span class="tabEnd"> </span></span><span id="t1" class="tableTab"><span><a href="javascript:show(1);">Static 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>static java.lang.String</code></td>
- <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="../../javassist/bytecode/Descriptor.html#appendParameter-java.lang.String-java.lang.String-">appendParameter</a></span>​(java.lang.String classname,
- java.lang.String desc)</code></th>
- <td class="colLast">
- <div class="block">Appends a parameter type to the parameter list represented
- by the given descriptor.</div>
- </td>
- </tr>
- <tr id="i1" class="rowColor">
- <td class="colFirst"><code>static java.lang.String</code></td>
- <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="../../javassist/bytecode/Descriptor.html#appendParameter-javassist.CtClass-java.lang.String-">appendParameter</a></span>​(<a href="../../javassist/CtClass.html" title="class in javassist">CtClass</a> type,
- java.lang.String descriptor)</code></th>
- <td class="colLast">
- <div class="block">Appends a parameter type to the parameter list represented
- by the given descriptor.</div>
- </td>
- </tr>
- <tr id="i2" class="altColor">
- <td class="colFirst"><code>static int</code></td>
- <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="../../javassist/bytecode/Descriptor.html#arrayDimension-java.lang.String-">arrayDimension</a></span>​(java.lang.String desc)</code></th>
- <td class="colLast">
- <div class="block">Computes the dimension of the array represented by the given
- descriptor.</div>
- </td>
- </tr>
- <tr id="i3" class="rowColor">
- <td class="colFirst"><code>static java.lang.String</code></td>
- <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="../../javassist/bytecode/Descriptor.html#changeReturnType-java.lang.String-java.lang.String-">changeReturnType</a></span>​(java.lang.String classname,
- java.lang.String desc)</code></th>
- <td class="colLast">
- <div class="block">Changes the return type included in the given descriptor.</div>
- </td>
- </tr>
- <tr id="i4" class="altColor">
- <td class="colFirst"><code>static int</code></td>
- <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="../../javassist/bytecode/Descriptor.html#dataSize-java.lang.String-">dataSize</a></span>​(java.lang.String desc)</code></th>
- <td class="colLast">
- <div class="block">Computes the data size specified by the given descriptor.</div>
- </td>
- </tr>
- <tr id="i5" class="rowColor">
- <td class="colFirst"><code>static boolean</code></td>
- <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="../../javassist/bytecode/Descriptor.html#eqParamTypes-java.lang.String-java.lang.String-">eqParamTypes</a></span>​(java.lang.String desc1,
- java.lang.String desc2)</code></th>
- <td class="colLast">
- <div class="block">Returns true if the list of the parameter types of desc1 is equal to
- that of desc2.</div>
- </td>
- </tr>
- <tr id="i6" class="altColor">
- <td class="colFirst"><code>static java.lang.String</code></td>
- <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="../../javassist/bytecode/Descriptor.html#getParamDescriptor-java.lang.String-">getParamDescriptor</a></span>​(java.lang.String decl)</code></th>
- <td class="colLast">
- <div class="block">Returns the signature of the given descriptor.</div>
- </td>
- </tr>
- <tr id="i7" class="rowColor">
- <td class="colFirst"><code>static <a href="../../javassist/CtClass.html" title="class in javassist">CtClass</a>[]</code></td>
- <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="../../javassist/bytecode/Descriptor.html#getParameterTypes-java.lang.String-javassist.ClassPool-">getParameterTypes</a></span>​(java.lang.String desc,
- <a href="../../javassist/ClassPool.html" title="class in javassist">ClassPool</a> cp)</code></th>
- <td class="colLast">
- <div class="block">Returns the <code>CtClass</code> objects representing the parameter
- types specified by the given descriptor.</div>
- </td>
- </tr>
- <tr id="i8" class="altColor">
- <td class="colFirst"><code>static <a href="../../javassist/CtClass.html" title="class in javassist">CtClass</a></code></td>
- <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="../../javassist/bytecode/Descriptor.html#getReturnType-java.lang.String-javassist.ClassPool-">getReturnType</a></span>​(java.lang.String desc,
- <a href="../../javassist/ClassPool.html" title="class in javassist">ClassPool</a> cp)</code></th>
- <td class="colLast">
- <div class="block">Returns the <code>CtClass</code> object representing the return
- type specified by the given descriptor.</div>
- </td>
- </tr>
- <tr id="i9" class="rowColor">
- <td class="colFirst"><code>static java.lang.String</code></td>
- <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="../../javassist/bytecode/Descriptor.html#insertParameter-java.lang.String-java.lang.String-">insertParameter</a></span>​(java.lang.String classname,
- java.lang.String desc)</code></th>
- <td class="colLast">
- <div class="block">Inserts a parameter type at the beginning of the parameter
- list represented
- by the given descriptor.</div>
- </td>
- </tr>
- <tr id="i10" class="altColor">
- <td class="colFirst"><code>static java.lang.String</code></td>
- <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="../../javassist/bytecode/Descriptor.html#insertParameter-javassist.CtClass-java.lang.String-">insertParameter</a></span>​(<a href="../../javassist/CtClass.html" title="class in javassist">CtClass</a> type,
- java.lang.String descriptor)</code></th>
- <td class="colLast">
- <div class="block">Inserts a parameter type at the beginning of the parameter
- list represented
- by the given descriptor.</div>
- </td>
- </tr>
- <tr id="i11" class="rowColor">
- <td class="colFirst"><code>static int</code></td>
- <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="../../javassist/bytecode/Descriptor.html#numOfParameters-java.lang.String-">numOfParameters</a></span>​(java.lang.String desc)</code></th>
- <td class="colLast">
- <div class="block">Returns the number of the prameters included in the given
- descriptor.</div>
- </td>
- </tr>
- <tr id="i12" class="altColor">
- <td class="colFirst"><code>static java.lang.String</code></td>
- <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="../../javassist/bytecode/Descriptor.html#of-java.lang.String-">of</a></span>​(java.lang.String classname)</code></th>
- <td class="colLast">
- <div class="block">Converts to a descriptor from a Java class name</div>
- </td>
- </tr>
- <tr id="i13" class="rowColor">
- <td class="colFirst"><code>static java.lang.String</code></td>
- <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="../../javassist/bytecode/Descriptor.html#of-javassist.CtClass-">of</a></span>​(<a href="../../javassist/CtClass.html" title="class in javassist">CtClass</a> type)</code></th>
- <td class="colLast">
- <div class="block">Returns the descriptor representing the given type.</div>
- </td>
- </tr>
- <tr id="i14" class="altColor">
- <td class="colFirst"><code>static java.lang.String</code></td>
- <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="../../javassist/bytecode/Descriptor.html#ofConstructor-javassist.CtClass:A-">ofConstructor</a></span>​(<a href="../../javassist/CtClass.html" title="class in javassist">CtClass</a>[] paramTypes)</code></th>
- <td class="colLast">
- <div class="block">Returns the descriptor representing a constructor receiving
- the given parameter types.</div>
- </td>
- </tr>
- <tr id="i15" class="rowColor">
- <td class="colFirst"><code>static java.lang.String</code></td>
- <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="../../javassist/bytecode/Descriptor.html#ofMethod-javassist.CtClass-javassist.CtClass:A-">ofMethod</a></span>​(<a href="../../javassist/CtClass.html" title="class in javassist">CtClass</a> returnType,
- <a href="../../javassist/CtClass.html" title="class in javassist">CtClass</a>[] paramTypes)</code></th>
- <td class="colLast">
- <div class="block">Returns the descriptor representing a method that receives
- the given parameter types and returns the given type.</div>
- </td>
- </tr>
- <tr id="i16" class="altColor">
- <td class="colFirst"><code>static java.lang.String</code></td>
- <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="../../javassist/bytecode/Descriptor.html#ofParameters-javassist.CtClass:A-">ofParameters</a></span>​(<a href="../../javassist/CtClass.html" title="class in javassist">CtClass</a>[] paramTypes)</code></th>
- <td class="colLast">
- <div class="block">Returns the descriptor representing a list of parameter types.</div>
- </td>
- </tr>
- <tr id="i17" class="rowColor">
- <td class="colFirst"><code>static int</code></td>
- <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="../../javassist/bytecode/Descriptor.html#paramSize-java.lang.String-">paramSize</a></span>​(java.lang.String desc)</code></th>
- <td class="colLast">
- <div class="block">Computes the data size of parameters.</div>
- </td>
- </tr>
- <tr id="i18" class="altColor">
- <td class="colFirst"><code>static java.lang.String</code></td>
- <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="../../javassist/bytecode/Descriptor.html#rename-java.lang.String-java.lang.String-java.lang.String-">rename</a></span>​(java.lang.String desc,
- java.lang.String oldname,
- java.lang.String newname)</code></th>
- <td class="colLast">
- <div class="block">Substitutes a class name
- in the given descriptor string.</div>
- </td>
- </tr>
- <tr id="i19" class="rowColor">
- <td class="colFirst"><code>static java.lang.String</code></td>
- <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="../../javassist/bytecode/Descriptor.html#rename-java.lang.String-java.util.Map-">rename</a></span>​(java.lang.String desc,
- java.util.Map<java.lang.String,java.lang.String> map)</code></th>
- <td class="colLast">
- <div class="block">Substitutes class names in the given descriptor string
- according to the given <code>map</code>.</div>
- </td>
- </tr>
- <tr id="i20" class="altColor">
- <td class="colFirst"><code>static java.lang.String</code></td>
- <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="../../javassist/bytecode/Descriptor.html#toArrayComponent-java.lang.String-int-">toArrayComponent</a></span>​(java.lang.String desc,
- int dim)</code></th>
- <td class="colLast">
- <div class="block">Returns the descriptor of the type of the array component.</div>
- </td>
- </tr>
- <tr id="i21" class="rowColor">
- <td class="colFirst"><code>static java.lang.String</code></td>
- <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="../../javassist/bytecode/Descriptor.html#toClassName-java.lang.String-">toClassName</a></span>​(java.lang.String descriptor)</code></th>
- <td class="colLast">
- <div class="block">Converts to a Java class name from a descriptor.</div>
- </td>
- </tr>
- <tr id="i22" class="altColor">
- <td class="colFirst"><code>static <a href="../../javassist/CtClass.html" title="class in javassist">CtClass</a></code></td>
- <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="../../javassist/bytecode/Descriptor.html#toCtClass-java.lang.String-javassist.ClassPool-">toCtClass</a></span>​(java.lang.String desc,
- <a href="../../javassist/ClassPool.html" title="class in javassist">ClassPool</a> cp)</code></th>
- <td class="colLast">
- <div class="block">Returns a <code>CtClass</code> object representing the type
- specified by the given descriptor.</div>
- </td>
- </tr>
- <tr id="i23" class="rowColor">
- <td class="colFirst"><code>static java.lang.String</code></td>
- <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="../../javassist/bytecode/Descriptor.html#toJavaName-java.lang.String-">toJavaName</a></span>​(java.lang.String classname)</code></th>
- <td class="colLast">
- <div class="block">Converts a class name from the internal representation used in
- the JVM to the normal one used in Java.</div>
- </td>
- </tr>
- <tr id="i24" class="altColor">
- <td class="colFirst"><code>static java.lang.String</code></td>
- <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="../../javassist/bytecode/Descriptor.html#toJvmName-java.lang.String-">toJvmName</a></span>​(java.lang.String classname)</code></th>
- <td class="colLast">
- <div class="block">Converts a class name into the internal representation used in
- the JVM.</div>
- </td>
- </tr>
- <tr id="i25" class="rowColor">
- <td class="colFirst"><code>static java.lang.String</code></td>
- <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="../../javassist/bytecode/Descriptor.html#toJvmName-javassist.CtClass-">toJvmName</a></span>​(<a href="../../javassist/CtClass.html" title="class in javassist">CtClass</a> clazz)</code></th>
- <td class="colLast">
- <div class="block">Returns the internal representation of the class name in the
- JVM.</div>
- </td>
- </tr>
- <tr id="i26" class="altColor">
- <td class="colFirst"><code>static java.lang.String</code></td>
- <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="../../javassist/bytecode/Descriptor.html#toString-java.lang.String-">toString</a></span>​(java.lang.String desc)</code></th>
- <td class="colLast">
- <div class="block">Returns a human-readable representation of the
- given descriptor.</div>
- </td>
- </tr>
- </table>
- <ul class="blockList">
- <li class="blockList"><a name="methods.inherited.from.class.java.lang.Object">
- <!-- -->
- </a>
- <h3>Methods inherited from class java.lang.Object</h3>
- <code>equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait</code></li>
- </ul>
- </li>
- </ul>
- </li>
- </ul>
- </div>
- <div class="details">
- <ul class="blockList">
- <li class="blockList">
- <!-- ========= CONSTRUCTOR DETAIL ======== -->
- <ul class="blockList">
- <li class="blockList"><a name="constructor.detail">
- <!-- -->
- </a>
- <h3>Constructor Detail</h3>
- <a name="Descriptor--">
- <!-- -->
- </a>
- <ul class="blockListLast">
- <li class="blockList">
- <h4>Descriptor</h4>
- <pre>public Descriptor()</pre>
- </li>
- </ul>
- </li>
- </ul>
- <!-- ============ METHOD DETAIL ========== -->
- <ul class="blockList">
- <li class="blockList"><a name="method.detail">
- <!-- -->
- </a>
- <h3>Method Detail</h3>
- <a name="toJvmName-java.lang.String-">
- <!-- -->
- </a>
- <ul class="blockList">
- <li class="blockList">
- <h4>toJvmName</h4>
- <pre>public static java.lang.String toJvmName​(java.lang.String classname)</pre>
- <div class="block">Converts a class name into the internal representation used in
- the JVM.
-
- <p>Note that <code>toJvmName(toJvmName(s))</code> is equivalent
- to <code>toJvmName(s)</code>.</div>
- </li>
- </ul>
- <a name="toJavaName-java.lang.String-">
- <!-- -->
- </a>
- <ul class="blockList">
- <li class="blockList">
- <h4>toJavaName</h4>
- <pre>public static java.lang.String toJavaName​(java.lang.String classname)</pre>
- <div class="block">Converts a class name from the internal representation used in
- the JVM to the normal one used in Java.
- This method does not deal with an array type name such as
- "[Ljava/lang/Object;" and "[I;". For such names, use
- <code>toClassName()</code>.</div>
- <dl>
- <dt><span class="seeLabel">See Also:</span></dt>
- <dd><a href="../../javassist/bytecode/Descriptor.html#toClassName-java.lang.String-"><code>toClassName(String)</code></a></dd>
- </dl>
- </li>
- </ul>
- <a name="toJvmName-javassist.CtClass-">
- <!-- -->
- </a>
- <ul class="blockList">
- <li class="blockList">
- <h4>toJvmName</h4>
- <pre>public static java.lang.String toJvmName​(<a href="../../javassist/CtClass.html" title="class in javassist">CtClass</a> clazz)</pre>
- <div class="block">Returns the internal representation of the class name in the
- JVM.</div>
- </li>
- </ul>
- <a name="toClassName-java.lang.String-">
- <!-- -->
- </a>
- <ul class="blockList">
- <li class="blockList">
- <h4>toClassName</h4>
- <pre>public static java.lang.String toClassName​(java.lang.String descriptor)</pre>
- <div class="block">Converts to a Java class name from a descriptor.</div>
- <dl>
- <dt><span class="paramLabel">Parameters:</span></dt>
- <dd><code>descriptor</code> - type descriptor.</dd>
- </dl>
- </li>
- </ul>
- <a name="of-java.lang.String-">
- <!-- -->
- </a>
- <ul class="blockList">
- <li class="blockList">
- <h4>of</h4>
- <pre>public static java.lang.String of​(java.lang.String classname)</pre>
- <div class="block">Converts to a descriptor from a Java class name</div>
- </li>
- </ul>
- <a name="rename-java.lang.String-java.lang.String-java.lang.String-">
- <!-- -->
- </a>
- <ul class="blockList">
- <li class="blockList">
- <h4>rename</h4>
- <pre>public static java.lang.String rename​(java.lang.String desc,
- java.lang.String oldname,
- java.lang.String newname)</pre>
- <div class="block">Substitutes a class name
- in the given descriptor string.</div>
- <dl>
- <dt><span class="paramLabel">Parameters:</span></dt>
- <dd><code>desc</code> - descriptor string</dd>
- <dd><code>oldname</code> - replaced JVM class name</dd>
- <dd><code>newname</code> - substituted JVM class name</dd>
- <dt><span class="seeLabel">See Also:</span></dt>
- <dd><a href="../../javassist/bytecode/Descriptor.html#toJvmName-java.lang.String-"><code>toJvmName(String)</code></a></dd>
- </dl>
- </li>
- </ul>
- <a name="rename-java.lang.String-java.util.Map-">
- <!-- -->
- </a>
- <ul class="blockList">
- <li class="blockList">
- <h4>rename</h4>
- <pre>public static java.lang.String rename​(java.lang.String desc,
- java.util.Map<java.lang.String,java.lang.String> map)</pre>
- <div class="block">Substitutes class names in the given descriptor string
- according to the given <code>map</code>.</div>
- <dl>
- <dt><span class="paramLabel">Parameters:</span></dt>
- <dd><code>map</code> - a map between replaced and substituted
- JVM class names.</dd>
- <dt><span class="seeLabel">See Also:</span></dt>
- <dd><a href="../../javassist/bytecode/Descriptor.html#toJvmName-java.lang.String-"><code>toJvmName(String)</code></a></dd>
- </dl>
- </li>
- </ul>
- <a name="of-javassist.CtClass-">
- <!-- -->
- </a>
- <ul class="blockList">
- <li class="blockList">
- <h4>of</h4>
- <pre>public static java.lang.String of​(<a href="../../javassist/CtClass.html" title="class in javassist">CtClass</a> type)</pre>
- <div class="block">Returns the descriptor representing the given type.</div>
- </li>
- </ul>
- <a name="ofConstructor-javassist.CtClass:A-">
- <!-- -->
- </a>
- <ul class="blockList">
- <li class="blockList">
- <h4>ofConstructor</h4>
- <pre>public static java.lang.String ofConstructor​(<a href="../../javassist/CtClass.html" title="class in javassist">CtClass</a>[] paramTypes)</pre>
- <div class="block">Returns the descriptor representing a constructor receiving
- the given parameter types.</div>
- <dl>
- <dt><span class="paramLabel">Parameters:</span></dt>
- <dd><code>paramTypes</code> - parameter types</dd>
- </dl>
- </li>
- </ul>
- <a name="ofMethod-javassist.CtClass-javassist.CtClass:A-">
- <!-- -->
- </a>
- <ul class="blockList">
- <li class="blockList">
- <h4>ofMethod</h4>
- <pre>public static java.lang.String ofMethod​(<a href="../../javassist/CtClass.html" title="class in javassist">CtClass</a> returnType,
- <a href="../../javassist/CtClass.html" title="class in javassist">CtClass</a>[] paramTypes)</pre>
- <div class="block">Returns the descriptor representing a method that receives
- the given parameter types and returns the given type.</div>
- <dl>
- <dt><span class="paramLabel">Parameters:</span></dt>
- <dd><code>returnType</code> - return type</dd>
- <dd><code>paramTypes</code> - parameter types</dd>
- </dl>
- </li>
- </ul>
- <a name="ofParameters-javassist.CtClass:A-">
- <!-- -->
- </a>
- <ul class="blockList">
- <li class="blockList">
- <h4>ofParameters</h4>
- <pre>public static java.lang.String ofParameters​(<a href="../../javassist/CtClass.html" title="class in javassist">CtClass</a>[] paramTypes)</pre>
- <div class="block">Returns the descriptor representing a list of parameter types.
- For example, if the given parameter types are two <code>int</code>,
- then this method returns <code>"(II)"</code>.</div>
- <dl>
- <dt><span class="paramLabel">Parameters:</span></dt>
- <dd><code>paramTypes</code> - parameter types</dd>
- </dl>
- </li>
- </ul>
- <a name="appendParameter-java.lang.String-java.lang.String-">
- <!-- -->
- </a>
- <ul class="blockList">
- <li class="blockList">
- <h4>appendParameter</h4>
- <pre>public static java.lang.String appendParameter​(java.lang.String classname,
- java.lang.String desc)</pre>
- <div class="block">Appends a parameter type to the parameter list represented
- by the given descriptor.
-
- <p><code>classname</code> must not be an array type.</div>
- <dl>
- <dt><span class="paramLabel">Parameters:</span></dt>
- <dd><code>classname</code> - parameter type (not primitive type)</dd>
- <dd><code>desc</code> - descriptor</dd>
- </dl>
- </li>
- </ul>
- <a name="insertParameter-java.lang.String-java.lang.String-">
- <!-- -->
- </a>
- <ul class="blockList">
- <li class="blockList">
- <h4>insertParameter</h4>
- <pre>public static java.lang.String insertParameter​(java.lang.String classname,
- java.lang.String desc)</pre>
- <div class="block">Inserts a parameter type at the beginning of the parameter
- list represented
- by the given descriptor.
-
- <p><code>classname</code> must not be an array type.</div>
- <dl>
- <dt><span class="paramLabel">Parameters:</span></dt>
- <dd><code>classname</code> - parameter type (not primitive type)</dd>
- <dd><code>desc</code> - descriptor</dd>
- </dl>
- </li>
- </ul>
- <a name="appendParameter-javassist.CtClass-java.lang.String-">
- <!-- -->
- </a>
- <ul class="blockList">
- <li class="blockList">
- <h4>appendParameter</h4>
- <pre>public static java.lang.String appendParameter​(<a href="../../javassist/CtClass.html" title="class in javassist">CtClass</a> type,
- java.lang.String descriptor)</pre>
- <div class="block">Appends a parameter type to the parameter list represented
- by the given descriptor. The appended parameter becomes
- the last parameter.</div>
- <dl>
- <dt><span class="paramLabel">Parameters:</span></dt>
- <dd><code>type</code> - the type of the appended parameter.</dd>
- <dd><code>descriptor</code> - the original descriptor.</dd>
- </dl>
- </li>
- </ul>
- <a name="insertParameter-javassist.CtClass-java.lang.String-">
- <!-- -->
- </a>
- <ul class="blockList">
- <li class="blockList">
- <h4>insertParameter</h4>
- <pre>public static java.lang.String insertParameter​(<a href="../../javassist/CtClass.html" title="class in javassist">CtClass</a> type,
- java.lang.String descriptor)</pre>
- <div class="block">Inserts a parameter type at the beginning of the parameter
- list represented
- by the given descriptor.</div>
- <dl>
- <dt><span class="paramLabel">Parameters:</span></dt>
- <dd><code>type</code> - the type of the inserted parameter.</dd>
- <dd><code>descriptor</code> - the descriptor of the method.</dd>
- </dl>
- </li>
- </ul>
- <a name="changeReturnType-java.lang.String-java.lang.String-">
- <!-- -->
- </a>
- <ul class="blockList">
- <li class="blockList">
- <h4>changeReturnType</h4>
- <pre>public static java.lang.String changeReturnType​(java.lang.String classname,
- java.lang.String desc)</pre>
- <div class="block">Changes the return type included in the given descriptor.
-
- <p><code>classname</code> must not be an array type.</div>
- <dl>
- <dt><span class="paramLabel">Parameters:</span></dt>
- <dd><code>classname</code> - return type</dd>
- <dd><code>desc</code> - descriptor</dd>
- </dl>
- </li>
- </ul>
- <a name="getParameterTypes-java.lang.String-javassist.ClassPool-">
- <!-- -->
- </a>
- <ul class="blockList">
- <li class="blockList">
- <h4>getParameterTypes</h4>
- <pre>public static <a href="../../javassist/CtClass.html" title="class in javassist">CtClass</a>[] getParameterTypes​(java.lang.String desc,
- <a href="../../javassist/ClassPool.html" title="class in javassist">ClassPool</a> cp)
- throws <a href="../../javassist/NotFoundException.html" title="class in javassist">NotFoundException</a></pre>
- <div class="block">Returns the <code>CtClass</code> objects representing the parameter
- types specified by the given descriptor.</div>
- <dl>
- <dt><span class="paramLabel">Parameters:</span></dt>
- <dd><code>desc</code> - descriptor</dd>
- <dd><code>cp</code> - the class pool used for obtaining
- a <code>CtClass</code> object.</dd>
- <dt><span class="throwsLabel">Throws:</span></dt>
- <dd><code><a href="../../javassist/NotFoundException.html" title="class in javassist">NotFoundException</a></code></dd>
- </dl>
- </li>
- </ul>
- <a name="eqParamTypes-java.lang.String-java.lang.String-">
- <!-- -->
- </a>
- <ul class="blockList">
- <li class="blockList">
- <h4>eqParamTypes</h4>
- <pre>public static boolean eqParamTypes​(java.lang.String desc1,
- java.lang.String desc2)</pre>
- <div class="block">Returns true if the list of the parameter types of desc1 is equal to
- that of desc2.
- For example, "(II)V" and "(II)I" are equal.</div>
- </li>
- </ul>
- <a name="getParamDescriptor-java.lang.String-">
- <!-- -->
- </a>
- <ul class="blockList">
- <li class="blockList">
- <h4>getParamDescriptor</h4>
- <pre>public static java.lang.String getParamDescriptor​(java.lang.String decl)</pre>
- <div class="block">Returns the signature of the given descriptor. The signature does
- not include the return type. For example, the signature of "(I)V"
- is "(I)".</div>
- </li>
- </ul>
- <a name="getReturnType-java.lang.String-javassist.ClassPool-">
- <!-- -->
- </a>
- <ul class="blockList">
- <li class="blockList">
- <h4>getReturnType</h4>
- <pre>public static <a href="../../javassist/CtClass.html" title="class in javassist">CtClass</a> getReturnType​(java.lang.String desc,
- <a href="../../javassist/ClassPool.html" title="class in javassist">ClassPool</a> cp)
- throws <a href="../../javassist/NotFoundException.html" title="class in javassist">NotFoundException</a></pre>
- <div class="block">Returns the <code>CtClass</code> object representing the return
- type specified by the given descriptor.</div>
- <dl>
- <dt><span class="paramLabel">Parameters:</span></dt>
- <dd><code>desc</code> - descriptor</dd>
- <dd><code>cp</code> - the class pool used for obtaining
- a <code>CtClass</code> object.</dd>
- <dt><span class="throwsLabel">Throws:</span></dt>
- <dd><code><a href="../../javassist/NotFoundException.html" title="class in javassist">NotFoundException</a></code></dd>
- </dl>
- </li>
- </ul>
- <a name="numOfParameters-java.lang.String-">
- <!-- -->
- </a>
- <ul class="blockList">
- <li class="blockList">
- <h4>numOfParameters</h4>
- <pre>public static int numOfParameters​(java.lang.String desc)</pre>
- <div class="block">Returns the number of the prameters included in the given
- descriptor.</div>
- <dl>
- <dt><span class="paramLabel">Parameters:</span></dt>
- <dd><code>desc</code> - descriptor</dd>
- </dl>
- </li>
- </ul>
- <a name="toCtClass-java.lang.String-javassist.ClassPool-">
- <!-- -->
- </a>
- <ul class="blockList">
- <li class="blockList">
- <h4>toCtClass</h4>
- <pre>public static <a href="../../javassist/CtClass.html" title="class in javassist">CtClass</a> toCtClass​(java.lang.String desc,
- <a href="../../javassist/ClassPool.html" title="class in javassist">ClassPool</a> cp)
- throws <a href="../../javassist/NotFoundException.html" title="class in javassist">NotFoundException</a></pre>
- <div class="block">Returns a <code>CtClass</code> object representing the type
- specified by the given descriptor.
-
- <p>This method works even if the package-class separator is
- not <code>/</code> but <code>.</code> (period). For example,
- it accepts <code>Ljava.lang.Object;</code>
- as well as <code>Ljava/lang/Object;</code>.</div>
- <dl>
- <dt><span class="paramLabel">Parameters:</span></dt>
- <dd><code>desc</code> - descriptor.</dd>
- <dd><code>cp</code> - the class pool used for obtaining
- a <code>CtClass</code> object.</dd>
- <dt><span class="throwsLabel">Throws:</span></dt>
- <dd><code><a href="../../javassist/NotFoundException.html" title="class in javassist">NotFoundException</a></code></dd>
- </dl>
- </li>
- </ul>
- <a name="arrayDimension-java.lang.String-">
- <!-- -->
- </a>
- <ul class="blockList">
- <li class="blockList">
- <h4>arrayDimension</h4>
- <pre>public static int arrayDimension​(java.lang.String desc)</pre>
- <div class="block">Computes the dimension of the array represented by the given
- descriptor. For example, if the descriptor is <code>"[[I"</code>,
- then this method returns 2.</div>
- <dl>
- <dt><span class="paramLabel">Parameters:</span></dt>
- <dd><code>desc</code> - the descriptor.</dd>
- <dt><span class="returnLabel">Returns:</span></dt>
- <dd>0 if the descriptor does not represent an array type.</dd>
- </dl>
- </li>
- </ul>
- <a name="toArrayComponent-java.lang.String-int-">
- <!-- -->
- </a>
- <ul class="blockList">
- <li class="blockList">
- <h4>toArrayComponent</h4>
- <pre>public static java.lang.String toArrayComponent​(java.lang.String desc,
- int dim)</pre>
- <div class="block">Returns the descriptor of the type of the array component.
- For example, if the given descriptor is
- <code>"[[Ljava/lang/String;"</code> and the given dimension is 2,
- then this method returns <code>"Ljava/lang/String;"</code>.</div>
- <dl>
- <dt><span class="paramLabel">Parameters:</span></dt>
- <dd><code>desc</code> - the descriptor.</dd>
- <dd><code>dim</code> - the array dimension.</dd>
- </dl>
- </li>
- </ul>
- <a name="dataSize-java.lang.String-">
- <!-- -->
- </a>
- <ul class="blockList">
- <li class="blockList">
- <h4>dataSize</h4>
- <pre>public static int dataSize​(java.lang.String desc)</pre>
- <div class="block">Computes the data size specified by the given descriptor.
- For example, if the descriptor is "D", this method returns 2.
-
- <p>If the descriptor represents a method type, this method returns
- (the size of the returned value) - (the sum of the data sizes
- of all the parameters). For example, if the descriptor is
- <code>"(I)D"</code>, then this method returns 1 (= 2 - 1).</div>
- <dl>
- <dt><span class="paramLabel">Parameters:</span></dt>
- <dd><code>desc</code> - descriptor</dd>
- </dl>
- </li>
- </ul>
- <a name="paramSize-java.lang.String-">
- <!-- -->
- </a>
- <ul class="blockList">
- <li class="blockList">
- <h4>paramSize</h4>
- <pre>public static int paramSize​(java.lang.String desc)</pre>
- <div class="block">Computes the data size of parameters.
- If one of the parameters is double type, the size of that parameter
- is 2 words. For example, if the given descriptor is
- <code>"(IJ)D"</code>, then this method returns 3. The size of the
- return type is not computed.</div>
- <dl>
- <dt><span class="paramLabel">Parameters:</span></dt>
- <dd><code>desc</code> - a method descriptor.</dd>
- </dl>
- </li>
- </ul>
- <a name="toString-java.lang.String-">
- <!-- -->
- </a>
- <ul class="blockListLast">
- <li class="blockList">
- <h4>toString</h4>
- <pre>public static java.lang.String toString​(java.lang.String desc)</pre>
- <div class="block">Returns a human-readable representation of the
- given descriptor. For example, <code>Ljava/lang/Object;</code>
- is converted into <code>java.lang.Object</code>.
- <code>(I[I)V</code> is converted into <code>(int, int[])</code>
- (the return type is ignored).</div>
- </li>
- </ul>
- </li>
- </ul>
- </li>
- </ul>
- </div>
- </div>
- <!-- ========= END OF CLASS DATA ========= -->
- <!-- ======= START OF BOTTOM NAVBAR ====== -->
- <div class="bottomNav"><a name="navbar.bottom">
- <!-- -->
- </a>
- <div class="skipNav"><a href="#skip.navbar.bottom" title="Skip navigation links">Skip navigation links</a></div>
- <a name="navbar.bottom.firstrow">
- <!-- -->
- </a>
- <ul class="navList" title="Navigation">
- <li><a href="../../overview-summary.html">Overview</a></li>
- <li><a href="package-summary.html">Package</a></li>
- <li class="navBarCell1Rev">Class</li>
- <li><a href="class-use/Descriptor.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">
- <li><a href="../../javassist/bytecode/DeprecatedAttribute.html" title="class in javassist.bytecode"><span class="typeNameLink">Prev Class</span></a></li>
- <li><a href="../../javassist/bytecode/Descriptor.Iterator.html" title="class in javassist.bytecode"><span class="typeNameLink">Next Class</span></a></li>
- </ul>
- <ul class="navList">
- <li><a href="../../index.html?javassist/bytecode/Descriptor.html" target="_top">Frames</a></li>
- <li><a href="Descriptor.html" target="_top">No Frames</a></li>
- </ul>
- <ul class="navList" id="allclasses_navbar_bottom">
- <li><a href="../../allclasses-noframe.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><a href="#nested.class.summary">Nested</a> | </li>
- <li>Field | </li>
- <li><a href="#constructor.summary">Constr</a> | </li>
- <li><a href="#method.summary">Method</a></li>
- </ul>
- <ul class="subNavList">
- <li>Detail: </li>
- <li>Field | </li>
- <li><a href="#constructor.detail">Constr</a> | </li>
- <li><a href="#method.detail">Method</a></li>
- </ul>
- </div>
- <a name="skip.navbar.bottom">
- <!-- -->
- </a></div>
- <!-- ======== END OF BOTTOM NAVBAR ======= -->
- <p class="legalCopy"><small><i>Javassist, a Java-bytecode translator toolkit.<br>
- Copyright (C) 1999- Shigeru Chiba. All Rights Reserved.</i></small></p>
- </body>
- </html>
|