123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371 |
- <!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>CodeIterator (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="CodeIterator (Javassist API)";
- }
- }
- catch(err) {
- }
- //-->
- var methods = {"i0":10,"i1":10,"i2":10,"i3":10,"i4":10,"i5":10,"i6":10,"i7":10,"i8":10,"i9":10,"i10":10,"i11":10,"i12":10,"i13":10,"i14":10,"i15":10,"i16":10,"i17":10,"i18":10,"i19":10,"i20":10,"i21":10,"i22":10,"i23":10,"i24":10,"i25":10,"i26":10,"i27":10,"i28":10,"i29":10,"i30":10,"i31":10,"i32":10,"i33":10,"i34":10,"i35":10};
- var tabs = {65535:["t0","All Methods"],2:["t2","Instance 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/CodeIterator.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/CodeAttribute.RuntimeCopyException.html" title="class in javassist.bytecode"><span class="typeNameLink">Prev Class</span></a></li>
- <li><a href="../../javassist/bytecode/CodeIterator.Gap.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/CodeIterator.html" target="_top">Frames</a></li>
- <li><a href="CodeIterator.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>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 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 CodeIterator" class="title">Class CodeIterator</h2>
- </div>
- <div class="contentContainer">
- <ul class="inheritance">
- <li>java.lang.Object</li>
- <li>
- <ul class="inheritance">
- <li>javassist.bytecode.CodeIterator</li>
- </ul>
- </li>
- </ul>
- <div class="description">
- <ul class="blockList">
- <li class="blockList">
- <dl>
- <dt>All Implemented Interfaces:</dt>
- <dd><code><a href="../../javassist/bytecode/Opcode.html" title="interface in javassist.bytecode">Opcode</a></code></dd>
- </dl>
- <hr>
- <pre>public class <span class="typeNameLabel">CodeIterator</span>
- extends java.lang.Object
- implements <a href="../../javassist/bytecode/Opcode.html" title="interface in javassist.bytecode">Opcode</a></pre>
- <div class="block">An iterator for editing a code attribute.
-
- <p>To directly read or edit a bytecode sequence, call <a href="../../javassist/bytecode/CodeIterator.html#byteAt-int-"><code>byteAt(int)</code></a>, <a href="../../javassist/bytecode/CodeIterator.html#s16bitAt-int-"><code>s16bitAt(int)</code></a>,
- <a href="../../javassist/bytecode/CodeIterator.html#writeByte-int-int-"><code>writeByte(int, int)</code></a>, <a href="../../javassist/bytecode/CodeIterator.html#write16bit-int-int-"><code>write16bit(int, int)</code></a>, and other methods.
- For example, if <code>method</code> refers to a <code>CtMethod</code> object,
- the following code substitutes the <code>NOP</code> instruction for the first
- instruction of the method:
-
- <pre>
- CodeAttribute ca = method.getMethodInfo().getCodeAttribute();
- CodeIterator ci = ca.iterator();
- ci.writeByte(Opcode.NOP, 0);</pre>
-
- <p>To visit every instruction, call <a href="../../javassist/bytecode/CodeIterator.html#next--"><code>next()</code></a> on a <code>CodeIterator</code>.
- It returns the index of the first byte of the next instruction.
-
- <p>If there are multiple <code>CodeIterator</code>s referring to the
- same <code>Code_attribute</code>, then inserting a gap by one
- <code>CodeIterator</code> will break the other
- <code>CodeIterator</code>.
-
- <p>This iterator does not provide <code>remove()</code>.
- If a piece of code in a <code>Code_attribute</code> is unnecessary,
- it should be overwritten with <code>NOP</code>.</div>
- <dl>
- <dt><span class="seeLabel">See Also:</span></dt>
- <dd><a href="../../javassist/bytecode/CodeAttribute.html#iterator--"><code>CodeAttribute.iterator()</code></a></dd>
- </dl>
- </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/CodeIterator.Gap.html" title="class in javassist.bytecode">CodeIterator.Gap</a></span></code></th>
- <td class="colLast">
- <div class="block">An inserted gap.</div>
- </td>
- </tr>
- </table>
- </li>
- </ul>
- <!-- =========== FIELD SUMMARY =========== -->
- <ul class="blockList">
- <li class="blockList"><a name="field.summary">
- <!-- -->
- </a>
- <h3>Field Summary</h3>
- <ul class="blockList">
- <li class="blockList"><a name="fields.inherited.from.class.javassist.bytecode.Opcode">
- <!-- -->
- </a>
- <h3>Fields inherited from interface javassist.bytecode.<a href="../../javassist/bytecode/Opcode.html" title="interface in javassist.bytecode">Opcode</a></h3>
- <code><a href="../../javassist/bytecode/Opcode.html#AALOAD">AALOAD</a>, <a href="../../javassist/bytecode/Opcode.html#AASTORE">AASTORE</a>, <a href="../../javassist/bytecode/Opcode.html#ACONST_NULL">ACONST_NULL</a>, <a href="../../javassist/bytecode/Opcode.html#ALOAD">ALOAD</a>, <a href="../../javassist/bytecode/Opcode.html#ALOAD_0">ALOAD_0</a>, <a href="../../javassist/bytecode/Opcode.html#ALOAD_1">ALOAD_1</a>, <a href="../../javassist/bytecode/Opcode.html#ALOAD_2">ALOAD_2</a>, <a href="../../javassist/bytecode/Opcode.html#ALOAD_3">ALOAD_3</a>, <a href="../../javassist/bytecode/Opcode.html#ANEWARRAY">ANEWARRAY</a>, <a href="../../javassist/bytecode/Opcode.html#ARETURN">ARETURN</a>, <a href="../../javassist/bytecode/Opcode.html#ARRAYLENGTH">ARRAYLENGTH</a>, <a href="../../javassist/bytecode/Opcode.html#ASTORE">ASTORE</a>, <a href="../../javassist/bytecode/Opcode.html#ASTORE_0">ASTORE_0</a>, <a href="../../javassist/bytecode/Opcode.html#ASTORE_1">ASTORE_1</a>, <a href="../../javassist/bytecode/Opcode.html#ASTORE_2">ASTORE_2</a>, <a href="../../javassist/bytecode/Opcode.html#ASTORE_3">ASTORE_3</a>, <a href="../../javassist/bytecode/Opcode.html#ATHROW">ATHROW</a>, <a href="../../javassist/bytecode/Opcode.html#BALOAD">BALOAD</a>, <a href="../../javassist/bytecode/Opcode.html#BASTORE">BASTORE</a>, <a href="../../javassist/bytecode/Opcode.html#BIPUSH">BIPUSH</a>, <a href="../../javassist/bytecode/Opcode.html#CALOAD">CALOAD</a>, <a href="../../javassist/bytecode/Opcode.html#CASTORE">CASTORE</a>, <a href="../../javassist/bytecode/Opcode.html#CHECKCAST">CHECKCAST</a>, <a href="../../javassist/bytecode/Opcode.html#D2F">D2F</a>, <a href="../../javassist/bytecode/Opcode.html#D2I">D2I</a>, <a href="../../javassist/bytecode/Opcode.html#D2L">D2L</a>, <a href="../../javassist/bytecode/Opcode.html#DADD">DADD</a>, <a href="../../javassist/bytecode/Opcode.html#DALOAD">DALOAD</a>, <a href="../../javassist/bytecode/Opcode.html#DASTORE">DASTORE</a>, <a href="../../javassist/bytecode/Opcode.html#DCMPG">DCMPG</a>, <a href="../../javassist/bytecode/Opcode.html#DCMPL">DCMPL</a>, <a href="../../javassist/bytecode/Opcode.html#DCONST_0">DCONST_0</a>, <a href="../../javassist/bytecode/Opcode.html#DCONST_1">DCONST_1</a>, <a href="../../javassist/bytecode/Opcode.html#DDIV">DDIV</a>, <a href="../../javassist/bytecode/Opcode.html#DLOAD">DLOAD</a>, <a href="../../javassist/bytecode/Opcode.html#DLOAD_0">DLOAD_0</a>, <a href="../../javassist/bytecode/Opcode.html#DLOAD_1">DLOAD_1</a>, <a href="../../javassist/bytecode/Opcode.html#DLOAD_2">DLOAD_2</a>, <a href="../../javassist/bytecode/Opcode.html#DLOAD_3">DLOAD_3</a>, <a href="../../javassist/bytecode/Opcode.html#DMUL">DMUL</a>, <a href="../../javassist/bytecode/Opcode.html#DNEG">DNEG</a>, <a href="../../javassist/bytecode/Opcode.html#DREM">DREM</a>, <a href="../../javassist/bytecode/Opcode.html#DRETURN">DRETURN</a>, <a href="../../javassist/bytecode/Opcode.html#DSTORE">DSTORE</a>, <a href="../../javassist/bytecode/Opcode.html#DSTORE_0">DSTORE_0</a>, <a href="../../javassist/bytecode/Opcode.html#DSTORE_1">DSTORE_1</a>, <a href="../../javassist/bytecode/Opcode.html#DSTORE_2">DSTORE_2</a>, <a href="../../javassist/bytecode/Opcode.html#DSTORE_3">DSTORE_3</a>, <a href="../../javassist/bytecode/Opcode.html#DSUB">DSUB</a>, <a href="../../javassist/bytecode/Opcode.html#DUP">DUP</a>, <a href="../../javassist/bytecode/Opcode.html#DUP_X1">DUP_X1</a>, <a href="../../javassist/bytecode/Opcode.html#DUP_X2">DUP_X2</a>, <a href="../../javassist/bytecode/Opcode.html#DUP2">DUP2</a>, <a href="../../javassist/bytecode/Opcode.html#DUP2_X1">DUP2_X1</a>, <a href="../../javassist/bytecode/Opcode.html#DUP2_X2">DUP2_X2</a>, <a href="../../javassist/bytecode/Opcode.html#F2D">F2D</a>, <a href="../../javassist/bytecode/Opcode.html#F2I">F2I</a>, <a href="../../javassist/bytecode/Opcode.html#F2L">F2L</a>, <a href="../../javassist/bytecode/Opcode.html#FADD">FADD</a>, <a href="../../javassist/bytecode/Opcode.html#FALOAD">FALOAD</a>, <a href="../../javassist/bytecode/Opcode.html#FASTORE">FASTORE</a>, <a href="../../javassist/bytecode/Opcode.html#FCMPG">FCMPG</a>, <a href="../../javassist/bytecode/Opcode.html#FCMPL">FCMPL</a>, <a href="../../javassist/bytecode/Opcode.html#FCONST_0">FCONST_0</a>, <a href="../../javassist/bytecode/Opcode.html#FCONST_1">FCONST_1</a>, <a href="../../javassist/bytecode/Opcode.html#FCONST_2">FCONST_2</a>, <a href="../../javassist/bytecode/Opcode.html#FDIV">FDIV</a>, <a href="../../javassist/bytecode/Opcode.html#FLOAD">FLOAD</a>, <a href="../../javassist/bytecode/Opcode.html#FLOAD_0">FLOAD_0</a>, <a href="../../javassist/bytecode/Opcode.html#FLOAD_1">FLOAD_1</a>, <a href="../../javassist/bytecode/Opcode.html#FLOAD_2">FLOAD_2</a>, <a href="../../javassist/bytecode/Opcode.html#FLOAD_3">FLOAD_3</a>, <a href="../../javassist/bytecode/Opcode.html#FMUL">FMUL</a>, <a href="../../javassist/bytecode/Opcode.html#FNEG">FNEG</a>, <a href="../../javassist/bytecode/Opcode.html#FREM">FREM</a>, <a href="../../javassist/bytecode/Opcode.html#FRETURN">FRETURN</a>, <a href="../../javassist/bytecode/Opcode.html#FSTORE">FSTORE</a>, <a href="../../javassist/bytecode/Opcode.html#FSTORE_0">FSTORE_0</a>, <a href="../../javassist/bytecode/Opcode.html#FSTORE_1">FSTORE_1</a>, <a href="../../javassist/bytecode/Opcode.html#FSTORE_2">FSTORE_2</a>, <a href="../../javassist/bytecode/Opcode.html#FSTORE_3">FSTORE_3</a>, <a href="../../javassist/bytecode/Opcode.html#FSUB">FSUB</a>, <a href="../../javassist/bytecode/Opcode.html#GETFIELD">GETFIELD</a>, <a href="../../javassist/bytecode/Opcode.html#GETSTATIC">GETSTATIC</a>, <a href="../../javassist/bytecode/Opcode.html#GOTO">GOTO</a>, <a href="../../javassist/bytecode/Opcode.html#GOTO_W">GOTO_W</a>, <a href="../../javassist/bytecode/Opcode.html#I2B">I2B</a>, <a href="../../javassist/bytecode/Opcode.html#I2C">I2C</a>, <a href="../../javassist/bytecode/Opcode.html#I2D">I2D</a>, <a href="../../javassist/bytecode/Opcode.html#I2F">I2F</a>, <a href="../../javassist/bytecode/Opcode.html#I2L">I2L</a>, <a href="../../javassist/bytecode/Opcode.html#I2S">I2S</a>, <a href="../../javassist/bytecode/Opcode.html#IADD">IADD</a>, <a href="../../javassist/bytecode/Opcode.html#IALOAD">IALOAD</a>, <a href="../../javassist/bytecode/Opcode.html#IAND">IAND</a>, <a href="../../javassist/bytecode/Opcode.html#IASTORE">IASTORE</a>, <a href="../../javassist/bytecode/Opcode.html#ICONST_0">ICONST_0</a>, <a href="../../javassist/bytecode/Opcode.html#ICONST_1">ICONST_1</a>, <a href="../../javassist/bytecode/Opcode.html#ICONST_2">ICONST_2</a>, <a href="../../javassist/bytecode/Opcode.html#ICONST_3">ICONST_3</a>, <a href="../../javassist/bytecode/Opcode.html#ICONST_4">ICONST_4</a>, <a href="../../javassist/bytecode/Opcode.html#ICONST_5">ICONST_5</a>, <a href="../../javassist/bytecode/Opcode.html#ICONST_M1">ICONST_M1</a>, <a href="../../javassist/bytecode/Opcode.html#IDIV">IDIV</a>, <a href="../../javassist/bytecode/Opcode.html#IF_ACMPEQ">IF_ACMPEQ</a>, <a href="../../javassist/bytecode/Opcode.html#IF_ACMPNE">IF_ACMPNE</a>, <a href="../../javassist/bytecode/Opcode.html#IF_ICMPEQ">IF_ICMPEQ</a>, <a href="../../javassist/bytecode/Opcode.html#IF_ICMPGE">IF_ICMPGE</a>, <a href="../../javassist/bytecode/Opcode.html#IF_ICMPGT">IF_ICMPGT</a>, <a href="../../javassist/bytecode/Opcode.html#IF_ICMPLE">IF_ICMPLE</a>, <a href="../../javassist/bytecode/Opcode.html#IF_ICMPLT">IF_ICMPLT</a>, <a href="../../javassist/bytecode/Opcode.html#IF_ICMPNE">IF_ICMPNE</a>, <a href="../../javassist/bytecode/Opcode.html#IFEQ">IFEQ</a>, <a href="../../javassist/bytecode/Opcode.html#IFGE">IFGE</a>, <a href="../../javassist/bytecode/Opcode.html#IFGT">IFGT</a>, <a href="../../javassist/bytecode/Opcode.html#IFLE">IFLE</a>, <a href="../../javassist/bytecode/Opcode.html#IFLT">IFLT</a>, <a href="../../javassist/bytecode/Opcode.html#IFNE">IFNE</a>, <a href="../../javassist/bytecode/Opcode.html#IFNONNULL">IFNONNULL</a>, <a href="../../javassist/bytecode/Opcode.html#IFNULL">IFNULL</a>, <a href="../../javassist/bytecode/Opcode.html#IINC">IINC</a>, <a href="../../javassist/bytecode/Opcode.html#ILOAD">ILOAD</a>, <a href="../../javassist/bytecode/Opcode.html#ILOAD_0">ILOAD_0</a>, <a href="../../javassist/bytecode/Opcode.html#ILOAD_1">ILOAD_1</a>, <a href="../../javassist/bytecode/Opcode.html#ILOAD_2">ILOAD_2</a>, <a href="../../javassist/bytecode/Opcode.html#ILOAD_3">ILOAD_3</a>, <a href="../../javassist/bytecode/Opcode.html#IMUL">IMUL</a>, <a href="../../javassist/bytecode/Opcode.html#INEG">INEG</a>, <a href="../../javassist/bytecode/Opcode.html#INSTANCEOF">INSTANCEOF</a>, <a href="../../javassist/bytecode/Opcode.html#INVOKEDYNAMIC">INVOKEDYNAMIC</a>, <a href="../../javassist/bytecode/Opcode.html#INVOKEINTERFACE">INVOKEINTERFACE</a>, <a href="../../javassist/bytecode/Opcode.html#INVOKESPECIAL">INVOKESPECIAL</a>, <a href="../../javassist/bytecode/Opcode.html#INVOKESTATIC">INVOKESTATIC</a>, <a href="../../javassist/bytecode/Opcode.html#INVOKEVIRTUAL">INVOKEVIRTUAL</a>, <a href="../../javassist/bytecode/Opcode.html#IOR">IOR</a>, <a href="../../javassist/bytecode/Opcode.html#IREM">IREM</a>, <a href="../../javassist/bytecode/Opcode.html#IRETURN">IRETURN</a>, <a href="../../javassist/bytecode/Opcode.html#ISHL">ISHL</a>, <a href="../../javassist/bytecode/Opcode.html#ISHR">ISHR</a>, <a href="../../javassist/bytecode/Opcode.html#ISTORE">ISTORE</a>, <a href="../../javassist/bytecode/Opcode.html#ISTORE_0">ISTORE_0</a>, <a href="../../javassist/bytecode/Opcode.html#ISTORE_1">ISTORE_1</a>, <a href="../../javassist/bytecode/Opcode.html#ISTORE_2">ISTORE_2</a>, <a href="../../javassist/bytecode/Opcode.html#ISTORE_3">ISTORE_3</a>, <a href="../../javassist/bytecode/Opcode.html#ISUB">ISUB</a>, <a href="../../javassist/bytecode/Opcode.html#IUSHR">IUSHR</a>, <a href="../../javassist/bytecode/Opcode.html#IXOR">IXOR</a>, <a href="../../javassist/bytecode/Opcode.html#JSR">JSR</a>, <a href="../../javassist/bytecode/Opcode.html#JSR_W">JSR_W</a>, <a href="../../javassist/bytecode/Opcode.html#L2D">L2D</a>, <a href="../../javassist/bytecode/Opcode.html#L2F">L2F</a>, <a href="../../javassist/bytecode/Opcode.html#L2I">L2I</a>, <a href="../../javassist/bytecode/Opcode.html#LADD">LADD</a>, <a href="../../javassist/bytecode/Opcode.html#LALOAD">LALOAD</a>, <a href="../../javassist/bytecode/Opcode.html#LAND">LAND</a>, <a href="../../javassist/bytecode/Opcode.html#LASTORE">LASTORE</a>, <a href="../../javassist/bytecode/Opcode.html#LCMP">LCMP</a>, <a href="../../javassist/bytecode/Opcode.html#LCONST_0">LCONST_0</a>, <a href="../../javassist/bytecode/Opcode.html#LCONST_1">LCONST_1</a>, <a href="../../javassist/bytecode/Opcode.html#LDC">LDC</a>, <a href="../../javassist/bytecode/Opcode.html#LDC_W">LDC_W</a>, <a href="../../javassist/bytecode/Opcode.html#LDC2_W">LDC2_W</a>, <a href="../../javassist/bytecode/Opcode.html#LDIV">LDIV</a>, <a href="../../javassist/bytecode/Opcode.html#LLOAD">LLOAD</a>, <a href="../../javassist/bytecode/Opcode.html#LLOAD_0">LLOAD_0</a>, <a href="../../javassist/bytecode/Opcode.html#LLOAD_1">LLOAD_1</a>, <a href="../../javassist/bytecode/Opcode.html#LLOAD_2">LLOAD_2</a>, <a href="../../javassist/bytecode/Opcode.html#LLOAD_3">LLOAD_3</a>, <a href="../../javassist/bytecode/Opcode.html#LMUL">LMUL</a>, <a href="../../javassist/bytecode/Opcode.html#LNEG">LNEG</a>, <a href="../../javassist/bytecode/Opcode.html#LOOKUPSWITCH">LOOKUPSWITCH</a>, <a href="../../javassist/bytecode/Opcode.html#LOR">LOR</a>, <a href="../../javassist/bytecode/Opcode.html#LREM">LREM</a>, <a href="../../javassist/bytecode/Opcode.html#LRETURN">LRETURN</a>, <a href="../../javassist/bytecode/Opcode.html#LSHL">LSHL</a>, <a href="../../javassist/bytecode/Opcode.html#LSHR">LSHR</a>, <a href="../../javassist/bytecode/Opcode.html#LSTORE">LSTORE</a>, <a href="../../javassist/bytecode/Opcode.html#LSTORE_0">LSTORE_0</a>, <a href="../../javassist/bytecode/Opcode.html#LSTORE_1">LSTORE_1</a>, <a href="../../javassist/bytecode/Opcode.html#LSTORE_2">LSTORE_2</a>, <a href="../../javassist/bytecode/Opcode.html#LSTORE_3">LSTORE_3</a>, <a href="../../javassist/bytecode/Opcode.html#LSUB">LSUB</a>, <a href="../../javassist/bytecode/Opcode.html#LUSHR">LUSHR</a>, <a href="../../javassist/bytecode/Opcode.html#LXOR">LXOR</a>, <a href="../../javassist/bytecode/Opcode.html#MONITORENTER">MONITORENTER</a>, <a href="../../javassist/bytecode/Opcode.html#MONITOREXIT">MONITOREXIT</a>, <a href="../../javassist/bytecode/Opcode.html#MULTIANEWARRAY">MULTIANEWARRAY</a>, <a href="../../javassist/bytecode/Opcode.html#NEW">NEW</a>, <a href="../../javassist/bytecode/Opcode.html#NEWARRAY">NEWARRAY</a>, <a href="../../javassist/bytecode/Opcode.html#NOP">NOP</a>, <a href="../../javassist/bytecode/Opcode.html#POP">POP</a>, <a href="../../javassist/bytecode/Opcode.html#POP2">POP2</a>, <a href="../../javassist/bytecode/Opcode.html#PUTFIELD">PUTFIELD</a>, <a href="../../javassist/bytecode/Opcode.html#PUTSTATIC">PUTSTATIC</a>, <a href="../../javassist/bytecode/Opcode.html#RET">RET</a>, <a href="../../javassist/bytecode/Opcode.html#RETURN">RETURN</a>, <a href="../../javassist/bytecode/Opcode.html#SALOAD">SALOAD</a>, <a href="../../javassist/bytecode/Opcode.html#SASTORE">SASTORE</a>, <a href="../../javassist/bytecode/Opcode.html#SIPUSH">SIPUSH</a>, <a href="../../javassist/bytecode/Opcode.html#STACK_GROW">STACK_GROW</a>, <a href="../../javassist/bytecode/Opcode.html#SWAP">SWAP</a>, <a href="../../javassist/bytecode/Opcode.html#T_BOOLEAN">T_BOOLEAN</a>, <a href="../../javassist/bytecode/Opcode.html#T_BYTE">T_BYTE</a>, <a href="../../javassist/bytecode/Opcode.html#T_CHAR">T_CHAR</a>, <a href="../../javassist/bytecode/Opcode.html#T_DOUBLE">T_DOUBLE</a>, <a href="../../javassist/bytecode/Opcode.html#T_FLOAT">T_FLOAT</a>, <a href="../../javassist/bytecode/Opcode.html#T_INT">T_INT</a>, <a href="../../javassist/bytecode/Opcode.html#T_LONG">T_LONG</a>, <a href="../../javassist/bytecode/Opcode.html#T_SHORT">T_SHORT</a>, <a href="../../javassist/bytecode/Opcode.html#TABLESWITCH">TABLESWITCH</a>, <a href="../../javassist/bytecode/Opcode.html#WIDE">WIDE</a></code></li>
- </ul>
- </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="t2" class="tableTab"><span><a href="javascript:show(2);">Instance 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>int</code></td>
- <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="../../javassist/bytecode/CodeIterator.html#append-byte:A-">append</a></span>​(byte[] code)</code></th>
- <td class="colLast">
- <div class="block">Appends the given bytecode sequence at the end.</div>
- </td>
- </tr>
- <tr id="i1" class="rowColor">
- <td class="colFirst"><code>void</code></td>
- <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="../../javassist/bytecode/CodeIterator.html#append-javassist.bytecode.ExceptionTable-int-">append</a></span>​(<a href="../../javassist/bytecode/ExceptionTable.html" title="class in javassist.bytecode">ExceptionTable</a> et,
- int offset)</code></th>
- <td class="colLast">
- <div class="block">Copies and appends the entries in the given exception table
- at the end of the exception table in the code attribute
- edited by this object.</div>
- </td>
- </tr>
- <tr id="i2" class="altColor">
- <td class="colFirst"><code>void</code></td>
- <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="../../javassist/bytecode/CodeIterator.html#appendGap-int-">appendGap</a></span>​(int gapLength)</code></th>
- <td class="colLast">
- <div class="block">Appends a gap at the end of the bytecode sequence.</div>
- </td>
- </tr>
- <tr id="i3" class="rowColor">
- <td class="colFirst"><code>void</code></td>
- <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="../../javassist/bytecode/CodeIterator.html#begin--">begin</a></span>()</code></th>
- <td class="colLast">
- <div class="block">Moves to the first instruction.</div>
- </td>
- </tr>
- <tr id="i4" class="altColor">
- <td class="colFirst"><code>int</code></td>
- <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="../../javassist/bytecode/CodeIterator.html#byteAt-int-">byteAt</a></span>​(int index)</code></th>
- <td class="colLast">
- <div class="block">Returns the unsigned 8bit value at the given index.</div>
- </td>
- </tr>
- <tr id="i5" class="rowColor">
- <td class="colFirst"><code><a href="../../javassist/bytecode/CodeAttribute.html" title="class in javassist.bytecode">CodeAttribute</a></code></td>
- <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="../../javassist/bytecode/CodeIterator.html#get--">get</a></span>()</code></th>
- <td class="colLast">
- <div class="block">Returns a Code attribute read with this iterator.</div>
- </td>
- </tr>
- <tr id="i6" class="altColor">
- <td class="colFirst"><code>int</code></td>
- <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="../../javassist/bytecode/CodeIterator.html#getCodeLength--">getCodeLength</a></span>()</code></th>
- <td class="colLast">
- <div class="block">Returns <code>code_length</code> of <code>Code_attribute</code>.</div>
- </td>
- </tr>
- <tr id="i7" class="rowColor">
- <td class="colFirst"><code>int</code></td>
- <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="../../javassist/bytecode/CodeIterator.html#getMark--">getMark</a></span>()</code></th>
- <td class="colLast">
- <div class="block">Gets the index of the position of the mark set by
- <code>setMark</code>.</div>
- </td>
- </tr>
- <tr id="i8" class="altColor">
- <td class="colFirst"><code>boolean</code></td>
- <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="../../javassist/bytecode/CodeIterator.html#hasNext--">hasNext</a></span>()</code></th>
- <td class="colLast">
- <div class="block">Returns true if there is more instructions.</div>
- </td>
- </tr>
- <tr id="i9" class="rowColor">
- <td class="colFirst"><code>int</code></td>
- <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="../../javassist/bytecode/CodeIterator.html#insert-byte:A-">insert</a></span>​(byte[] code)</code></th>
- <td class="colLast">
- <div class="block">Inserts the given bytecode sequence
- before the next instruction that would be returned by
- <code>next()</code> (not before the instruction returned
- by the last call to <code>next()</code>).</div>
- </td>
- </tr>
- <tr id="i10" class="altColor">
- <td class="colFirst"><code>void</code></td>
- <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="../../javassist/bytecode/CodeIterator.html#insert-int-byte:A-">insert</a></span>​(int pos,
- byte[] code)</code></th>
- <td class="colLast">
- <div class="block">Inserts the given bytecode sequence
- before the instruction at the given index <code>pos</code>.</div>
- </td>
- </tr>
- <tr id="i11" class="rowColor">
- <td class="colFirst"><code>void</code></td>
- <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="../../javassist/bytecode/CodeIterator.html#insert-javassist.bytecode.ExceptionTable-int-">insert</a></span>​(<a href="../../javassist/bytecode/ExceptionTable.html" title="class in javassist.bytecode">ExceptionTable</a> et,
- int offset)</code></th>
- <td class="colLast">
- <div class="block">Copies and inserts the entries in the given exception table
- at the beginning of the exception table in the code attribute
- edited by this object.</div>
- </td>
- </tr>
- <tr id="i12" class="altColor">
- <td class="colFirst"><code>int</code></td>
- <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="../../javassist/bytecode/CodeIterator.html#insertAt-int-byte:A-">insertAt</a></span>​(int pos,
- byte[] code)</code></th>
- <td class="colLast">
- <div class="block">Inserts the given bytecode sequence
- before the instruction at the given index <code>pos</code>.</div>
- </td>
- </tr>
- <tr id="i13" class="rowColor">
- <td class="colFirst"><code>int</code></td>
- <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="../../javassist/bytecode/CodeIterator.html#insertEx-byte:A-">insertEx</a></span>​(byte[] code)</code></th>
- <td class="colLast">
- <div class="block">Inserts the given bytecode sequence exclusively
- before the next instruction that would be returned by
- <code>next()</code> (not before the instruction returned
- by tha last call to <code>next()</code>).</div>
- </td>
- </tr>
- <tr id="i14" class="altColor">
- <td class="colFirst"><code>void</code></td>
- <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="../../javassist/bytecode/CodeIterator.html#insertEx-int-byte:A-">insertEx</a></span>​(int pos,
- byte[] code)</code></th>
- <td class="colLast">
- <div class="block">Inserts the given bytecode sequence exclusively
- before the instruction at the given index <code>pos</code>.</div>
- </td>
- </tr>
- <tr id="i15" class="rowColor">
- <td class="colFirst"><code>int</code></td>
- <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="../../javassist/bytecode/CodeIterator.html#insertExAt-int-byte:A-">insertExAt</a></span>​(int pos,
- byte[] code)</code></th>
- <td class="colLast">
- <div class="block">Inserts the given bytecode sequence exclusively
- before the instruction at the given index <code>pos</code>.</div>
- </td>
- </tr>
- <tr id="i16" class="altColor">
- <td class="colFirst"><code>int</code></td>
- <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="../../javassist/bytecode/CodeIterator.html#insertExGap-int-">insertExGap</a></span>​(int length)</code></th>
- <td class="colLast">
- <div class="block">Inserts an exclusive gap
- before the next instruction that would be returned by
- <code>next()</code> (not before the instruction returned
- by the last call to <code>next()</code>).</div>
- </td>
- </tr>
- <tr id="i17" class="rowColor">
- <td class="colFirst"><code>int</code></td>
- <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="../../javassist/bytecode/CodeIterator.html#insertExGap-int-int-">insertExGap</a></span>​(int pos,
- int length)</code></th>
- <td class="colLast">
- <div class="block">Inserts an exclusive gap in front of the instruction at the given
- index <code>pos</code>.</div>
- </td>
- </tr>
- <tr id="i18" class="altColor">
- <td class="colFirst"><code>int</code></td>
- <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="../../javassist/bytecode/CodeIterator.html#insertGap-int-">insertGap</a></span>​(int length)</code></th>
- <td class="colLast">
- <div class="block">Inserts a gap
- before the next instruction that would be returned by
- <code>next()</code> (not before the instruction returned
- by the last call to <code>next()</code>).</div>
- </td>
- </tr>
- <tr id="i19" class="rowColor">
- <td class="colFirst"><code>int</code></td>
- <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="../../javassist/bytecode/CodeIterator.html#insertGap-int-int-">insertGap</a></span>​(int pos,
- int length)</code></th>
- <td class="colLast">
- <div class="block">Inserts a gap in front of the instruction at the given
- index <code>pos</code>.</div>
- </td>
- </tr>
- <tr id="i20" class="altColor">
- <td class="colFirst"><code><a href="../../javassist/bytecode/CodeIterator.Gap.html" title="class in javassist.bytecode">CodeIterator.Gap</a></code></td>
- <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="../../javassist/bytecode/CodeIterator.html#insertGapAt-int-int-boolean-">insertGapAt</a></span>​(int pos,
- int length,
- boolean exclusive)</code></th>
- <td class="colLast">
- <div class="block">Inserts an inclusive or exclusive gap in front of the instruction
- at the given index <code>pos</code>.</div>
- </td>
- </tr>
- <tr id="i21" class="rowColor">
- <td class="colFirst"><code>int</code></td>
- <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="../../javassist/bytecode/CodeIterator.html#lookAhead--">lookAhead</a></span>()</code></th>
- <td class="colLast">
- <div class="block">Obtains the value that the next call
- to <code>next()</code> will return.</div>
- </td>
- </tr>
- <tr id="i22" class="altColor">
- <td class="colFirst"><code>void</code></td>
- <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="../../javassist/bytecode/CodeIterator.html#move-int-">move</a></span>​(int index)</code></th>
- <td class="colLast">
- <div class="block">Moves to the given index.</div>
- </td>
- </tr>
- <tr id="i23" class="rowColor">
- <td class="colFirst"><code>int</code></td>
- <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="../../javassist/bytecode/CodeIterator.html#next--">next</a></span>()</code></th>
- <td class="colLast">
- <div class="block">Returns the index of the next instruction
- (not the operand following the current opcode).</div>
- </td>
- </tr>
- <tr id="i24" class="altColor">
- <td class="colFirst"><code>int</code></td>
- <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="../../javassist/bytecode/CodeIterator.html#s16bitAt-int-">s16bitAt</a></span>​(int index)</code></th>
- <td class="colLast">
- <div class="block">Returns the signed 16bit value at the given index.</div>
- </td>
- </tr>
- <tr id="i25" class="rowColor">
- <td class="colFirst"><code>int</code></td>
- <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="../../javassist/bytecode/CodeIterator.html#s32bitAt-int-">s32bitAt</a></span>​(int index)</code></th>
- <td class="colLast">
- <div class="block">Returns the signed 32bit value at the given index.</div>
- </td>
- </tr>
- <tr id="i26" class="altColor">
- <td class="colFirst"><code>void</code></td>
- <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="../../javassist/bytecode/CodeIterator.html#setMark-int-">setMark</a></span>​(int index)</code></th>
- <td class="colLast">
- <div class="block">Sets a mark to the bytecode at the given index.</div>
- </td>
- </tr>
- <tr id="i27" class="rowColor">
- <td class="colFirst"><code>int</code></td>
- <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="../../javassist/bytecode/CodeIterator.html#signedByteAt-int-">signedByteAt</a></span>​(int index)</code></th>
- <td class="colLast">
- <div class="block">Returns the signed 8bit value at the given index.</div>
- </td>
- </tr>
- <tr id="i28" class="altColor">
- <td class="colFirst"><code>int</code></td>
- <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="../../javassist/bytecode/CodeIterator.html#skipConstructor--">skipConstructor</a></span>()</code></th>
- <td class="colLast">
- <div class="block">Moves to the instruction for
- either <code>super()</code> or <code>this()</code>.</div>
- </td>
- </tr>
- <tr id="i29" class="rowColor">
- <td class="colFirst"><code>int</code></td>
- <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="../../javassist/bytecode/CodeIterator.html#skipSuperConstructor--">skipSuperConstructor</a></span>()</code></th>
- <td class="colLast">
- <div class="block">Moves to the instruction for <code>super()</code>.</div>
- </td>
- </tr>
- <tr id="i30" class="altColor">
- <td class="colFirst"><code>int</code></td>
- <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="../../javassist/bytecode/CodeIterator.html#skipThisConstructor--">skipThisConstructor</a></span>()</code></th>
- <td class="colLast">
- <div class="block">Moves to the instruction for <code>this()</code>.</div>
- </td>
- </tr>
- <tr id="i31" class="rowColor">
- <td class="colFirst"><code>int</code></td>
- <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="../../javassist/bytecode/CodeIterator.html#u16bitAt-int-">u16bitAt</a></span>​(int index)</code></th>
- <td class="colLast">
- <div class="block">Returns the unsigned 16bit value at the given index.</div>
- </td>
- </tr>
- <tr id="i32" class="altColor">
- <td class="colFirst"><code>void</code></td>
- <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="../../javassist/bytecode/CodeIterator.html#write-byte:A-int-">write</a></span>​(byte[] code,
- int index)</code></th>
- <td class="colLast">
- <div class="block">Writes a byte array at the index.</div>
- </td>
- </tr>
- <tr id="i33" class="rowColor">
- <td class="colFirst"><code>void</code></td>
- <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="../../javassist/bytecode/CodeIterator.html#write16bit-int-int-">write16bit</a></span>​(int value,
- int index)</code></th>
- <td class="colLast">
- <div class="block">Writes a 16 bit integer at the index.</div>
- </td>
- </tr>
- <tr id="i34" class="altColor">
- <td class="colFirst"><code>void</code></td>
- <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="../../javassist/bytecode/CodeIterator.html#write32bit-int-int-">write32bit</a></span>​(int value,
- int index)</code></th>
- <td class="colLast">
- <div class="block">Writes a 32bit integer at the index.</div>
- </td>
- </tr>
- <tr id="i35" class="rowColor">
- <td class="colFirst"><code>void</code></td>
- <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="../../javassist/bytecode/CodeIterator.html#writeByte-int-int-">writeByte</a></span>​(int value,
- int index)</code></th>
- <td class="colLast">
- <div class="block">Writes an 8bit value at the given index.</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">
- <!-- ============ METHOD DETAIL ========== -->
- <ul class="blockList">
- <li class="blockList"><a name="method.detail">
- <!-- -->
- </a>
- <h3>Method Detail</h3>
- <a name="begin--">
- <!-- -->
- </a>
- <ul class="blockList">
- <li class="blockList">
- <h4>begin</h4>
- <pre>public void begin()</pre>
- <div class="block">Moves to the first instruction.</div>
- </li>
- </ul>
- <a name="move-int-">
- <!-- -->
- </a>
- <ul class="blockList">
- <li class="blockList">
- <h4>move</h4>
- <pre>public void move​(int index)</pre>
- <div class="block">Moves to the given index.
-
- <p>The index of the next instruction is set to the given index.
- The successive call to <code>next()</code>
- returns the index that has been given to <code>move()</code>.
-
- <p>Note that the index is into the byte array returned by
- <code>get().getCode()</code>.</div>
- <dl>
- <dt><span class="seeLabel">See Also:</span></dt>
- <dd><a href="../../javassist/bytecode/CodeAttribute.html#getCode--"><code>CodeAttribute.getCode()</code></a></dd>
- </dl>
- </li>
- </ul>
- <a name="setMark-int-">
- <!-- -->
- </a>
- <ul class="blockList">
- <li class="blockList">
- <h4>setMark</h4>
- <pre>public void setMark​(int index)</pre>
- <div class="block">Sets a mark to the bytecode at the given index.
- The mark can be used to track the position of that bytecode
- when code blocks are inserted.
- If a code block is inclusively inserted at the position of the
- bytecode, the mark is set to the inserted code block.</div>
- <dl>
- <dt><span class="simpleTagLabel">Since:</span></dt>
- <dd>3.11</dd>
- <dt><span class="seeLabel">See Also:</span></dt>
- <dd><a href="../../javassist/bytecode/CodeIterator.html#getMark--"><code>getMark()</code></a></dd>
- </dl>
- </li>
- </ul>
- <a name="getMark--">
- <!-- -->
- </a>
- <ul class="blockList">
- <li class="blockList">
- <h4>getMark</h4>
- <pre>public int getMark()</pre>
- <div class="block">Gets the index of the position of the mark set by
- <code>setMark</code>.</div>
- <dl>
- <dt><span class="returnLabel">Returns:</span></dt>
- <dd>the index of the position.</dd>
- <dt><span class="simpleTagLabel">Since:</span></dt>
- <dd>3.11</dd>
- <dt><span class="seeLabel">See Also:</span></dt>
- <dd><a href="../../javassist/bytecode/CodeIterator.html#setMark-int-"><code>setMark(int)</code></a></dd>
- </dl>
- </li>
- </ul>
- <a name="get--">
- <!-- -->
- </a>
- <ul class="blockList">
- <li class="blockList">
- <h4>get</h4>
- <pre>public <a href="../../javassist/bytecode/CodeAttribute.html" title="class in javassist.bytecode">CodeAttribute</a> get()</pre>
- <div class="block">Returns a Code attribute read with this iterator.</div>
- </li>
- </ul>
- <a name="getCodeLength--">
- <!-- -->
- </a>
- <ul class="blockList">
- <li class="blockList">
- <h4>getCodeLength</h4>
- <pre>public int getCodeLength()</pre>
- <div class="block">Returns <code>code_length</code> of <code>Code_attribute</code>.</div>
- </li>
- </ul>
- <a name="byteAt-int-">
- <!-- -->
- </a>
- <ul class="blockList">
- <li class="blockList">
- <h4>byteAt</h4>
- <pre>public int byteAt​(int index)</pre>
- <div class="block">Returns the unsigned 8bit value at the given index.</div>
- </li>
- </ul>
- <a name="signedByteAt-int-">
- <!-- -->
- </a>
- <ul class="blockList">
- <li class="blockList">
- <h4>signedByteAt</h4>
- <pre>public int signedByteAt​(int index)</pre>
- <div class="block">Returns the signed 8bit value at the given index.</div>
- </li>
- </ul>
- <a name="writeByte-int-int-">
- <!-- -->
- </a>
- <ul class="blockList">
- <li class="blockList">
- <h4>writeByte</h4>
- <pre>public void writeByte​(int value,
- int index)</pre>
- <div class="block">Writes an 8bit value at the given index.</div>
- </li>
- </ul>
- <a name="u16bitAt-int-">
- <!-- -->
- </a>
- <ul class="blockList">
- <li class="blockList">
- <h4>u16bitAt</h4>
- <pre>public int u16bitAt​(int index)</pre>
- <div class="block">Returns the unsigned 16bit value at the given index.</div>
- </li>
- </ul>
- <a name="s16bitAt-int-">
- <!-- -->
- </a>
- <ul class="blockList">
- <li class="blockList">
- <h4>s16bitAt</h4>
- <pre>public int s16bitAt​(int index)</pre>
- <div class="block">Returns the signed 16bit value at the given index.</div>
- </li>
- </ul>
- <a name="write16bit-int-int-">
- <!-- -->
- </a>
- <ul class="blockList">
- <li class="blockList">
- <h4>write16bit</h4>
- <pre>public void write16bit​(int value,
- int index)</pre>
- <div class="block">Writes a 16 bit integer at the index.</div>
- </li>
- </ul>
- <a name="s32bitAt-int-">
- <!-- -->
- </a>
- <ul class="blockList">
- <li class="blockList">
- <h4>s32bitAt</h4>
- <pre>public int s32bitAt​(int index)</pre>
- <div class="block">Returns the signed 32bit value at the given index.</div>
- </li>
- </ul>
- <a name="write32bit-int-int-">
- <!-- -->
- </a>
- <ul class="blockList">
- <li class="blockList">
- <h4>write32bit</h4>
- <pre>public void write32bit​(int value,
- int index)</pre>
- <div class="block">Writes a 32bit integer at the index.</div>
- </li>
- </ul>
- <a name="write-byte:A-int-">
- <!-- -->
- </a>
- <ul class="blockList">
- <li class="blockList">
- <h4>write</h4>
- <pre>public void write​(byte[] code,
- int index)</pre>
- <div class="block">Writes a byte array at the index.</div>
- <dl>
- <dt><span class="paramLabel">Parameters:</span></dt>
- <dd><code>code</code> - may be a zero-length array.</dd>
- </dl>
- </li>
- </ul>
- <a name="hasNext--">
- <!-- -->
- </a>
- <ul class="blockList">
- <li class="blockList">
- <h4>hasNext</h4>
- <pre>public boolean hasNext()</pre>
- <div class="block">Returns true if there is more instructions.</div>
- </li>
- </ul>
- <a name="next--">
- <!-- -->
- </a>
- <ul class="blockList">
- <li class="blockList">
- <h4>next</h4>
- <pre>public int next()
- throws <a href="../../javassist/bytecode/BadBytecode.html" title="class in javassist.bytecode">BadBytecode</a></pre>
- <div class="block">Returns the index of the next instruction
- (not the operand following the current opcode).
-
- <p>Note that the index is into the byte array returned by
- <code>get().getCode()</code>.</div>
- <dl>
- <dt><span class="throwsLabel">Throws:</span></dt>
- <dd><code><a href="../../javassist/bytecode/BadBytecode.html" title="class in javassist.bytecode">BadBytecode</a></code></dd>
- <dt><span class="seeLabel">See Also:</span></dt>
- <dd><a href="../../javassist/bytecode/CodeAttribute.html#getCode--"><code>CodeAttribute.getCode()</code></a>,
- <a href="../../javassist/bytecode/CodeIterator.html#byteAt-int-"><code>byteAt(int)</code></a></dd>
- </dl>
- </li>
- </ul>
- <a name="lookAhead--">
- <!-- -->
- </a>
- <ul class="blockList">
- <li class="blockList">
- <h4>lookAhead</h4>
- <pre>public int lookAhead()</pre>
- <div class="block">Obtains the value that the next call
- to <code>next()</code> will return.
-
- <p>This method is side-effects free.
- Successive calls to <code>lookAhead()</code> return the
- same value until <code>next()</code> is called.</div>
- </li>
- </ul>
- <a name="skipConstructor--">
- <!-- -->
- </a>
- <ul class="blockList">
- <li class="blockList">
- <h4>skipConstructor</h4>
- <pre>public int skipConstructor()
- throws <a href="../../javassist/bytecode/BadBytecode.html" title="class in javassist.bytecode">BadBytecode</a></pre>
- <div class="block">Moves to the instruction for
- either <code>super()</code> or <code>this()</code>.
-
- <p>This method skips all the instructions for computing arguments
- to <code>super()</code> or <code>this()</code>, which should be
- placed at the beginning of a constructor body.
-
- <p>This method returns the index of INVOKESPECIAL instruction
- executing <code>super()</code> or <code>this()</code>.
- A successive call to <code>next()</code> returns the
- index of the next instruction following that INVOKESPECIAL.
-
- <p>This method works only for a constructor.</div>
- <dl>
- <dt><span class="returnLabel">Returns:</span></dt>
- <dd>the index of the INVOKESPECIAL instruction, or -1
- if a constructor invocation is not found.</dd>
- <dt><span class="throwsLabel">Throws:</span></dt>
- <dd><code><a href="../../javassist/bytecode/BadBytecode.html" title="class in javassist.bytecode">BadBytecode</a></code></dd>
- </dl>
- </li>
- </ul>
- <a name="skipSuperConstructor--">
- <!-- -->
- </a>
- <ul class="blockList">
- <li class="blockList">
- <h4>skipSuperConstructor</h4>
- <pre>public int skipSuperConstructor()
- throws <a href="../../javassist/bytecode/BadBytecode.html" title="class in javassist.bytecode">BadBytecode</a></pre>
- <div class="block">Moves to the instruction for <code>super()</code>.
-
- <p>This method skips all the instructions for computing arguments to
- <code>super()</code>, which should be
- placed at the beginning of a constructor body.
-
- <p>This method returns the index of INVOKESPECIAL instruction
- executing <code>super()</code>.
- A successive call to <code>next()</code> returns the
- index of the next instruction following that INVOKESPECIAL.
-
- <p>This method works only for a constructor.</div>
- <dl>
- <dt><span class="returnLabel">Returns:</span></dt>
- <dd>the index of the INVOKESPECIAL instruction, or -1
- if a super constructor invocation is not found
- but <code>this()</code> is found.</dd>
- <dt><span class="throwsLabel">Throws:</span></dt>
- <dd><code><a href="../../javassist/bytecode/BadBytecode.html" title="class in javassist.bytecode">BadBytecode</a></code></dd>
- </dl>
- </li>
- </ul>
- <a name="skipThisConstructor--">
- <!-- -->
- </a>
- <ul class="blockList">
- <li class="blockList">
- <h4>skipThisConstructor</h4>
- <pre>public int skipThisConstructor()
- throws <a href="../../javassist/bytecode/BadBytecode.html" title="class in javassist.bytecode">BadBytecode</a></pre>
- <div class="block">Moves to the instruction for <code>this()</code>.
-
- <p>This method skips all the instructions for computing arguments to
- <code>this()</code>, which should be
- placed at the beginning of a constructor body.
-
- <p>This method returns the index of INVOKESPECIAL instruction
- executing <code>this()</code>.
- A successive call to <code>next()</code> returns the
- index of the next instruction following that INVOKESPECIAL.
-
- <p>This method works only for a constructor.</div>
- <dl>
- <dt><span class="returnLabel">Returns:</span></dt>
- <dd>the index of the INVOKESPECIAL instruction, or -1
- if a explicit constructor invocation is not found
- but <code>super()</code> is found.</dd>
- <dt><span class="throwsLabel">Throws:</span></dt>
- <dd><code><a href="../../javassist/bytecode/BadBytecode.html" title="class in javassist.bytecode">BadBytecode</a></code></dd>
- </dl>
- </li>
- </ul>
- <a name="insert-byte:A-">
- <!-- -->
- </a>
- <ul class="blockList">
- <li class="blockList">
- <h4>insert</h4>
- <pre>public int insert​(byte[] code)
- throws <a href="../../javassist/bytecode/BadBytecode.html" title="class in javassist.bytecode">BadBytecode</a></pre>
- <div class="block">Inserts the given bytecode sequence
- before the next instruction that would be returned by
- <code>next()</code> (not before the instruction returned
- by the last call to <code>next()</code>).
- Branch offsets and the exception table are also updated.
-
- <p>If the next instruction is at the beginning of a block statement,
- then the bytecode is inserted within that block.
-
- <p>An extra gap may be inserted at the end of the inserted
- bytecode sequence for adjusting alignment if the code attribute
- includes <code>LOOKUPSWITCH</code> or <code>TABLESWITCH</code>.</div>
- <dl>
- <dt><span class="paramLabel">Parameters:</span></dt>
- <dd><code>code</code> - inserted bytecode sequence.</dd>
- <dt><span class="returnLabel">Returns:</span></dt>
- <dd>the index indicating the first byte of the
- inserted byte sequence.</dd>
- <dt><span class="throwsLabel">Throws:</span></dt>
- <dd><code><a href="../../javassist/bytecode/BadBytecode.html" title="class in javassist.bytecode">BadBytecode</a></code></dd>
- </dl>
- </li>
- </ul>
- <a name="insert-int-byte:A-">
- <!-- -->
- </a>
- <ul class="blockList">
- <li class="blockList">
- <h4>insert</h4>
- <pre>public void insert​(int pos,
- byte[] code)
- throws <a href="../../javassist/bytecode/BadBytecode.html" title="class in javassist.bytecode">BadBytecode</a></pre>
- <div class="block">Inserts the given bytecode sequence
- before the instruction at the given index <code>pos</code>.
- Branch offsets and the exception table are also updated.
-
- <p>If the instruction at the given index is at the beginning
- of a block statement,
- then the bytecode is inserted within that block.
-
- <p>An extra gap may be inserted at the end of the inserted
- bytecode sequence for adjusting alignment if the code attribute
- includes <code>LOOKUPSWITCH</code> or <code>TABLESWITCH</code>.
-
- <p>The index at which the byte sequence is actually inserted
- might be different from pos since some other bytes might be
- inserted at other positions (e.g. to change <code>GOTO</code>
- to <code>GOTO_W</code>).</div>
- <dl>
- <dt><span class="paramLabel">Parameters:</span></dt>
- <dd><code>pos</code> - the index at which a byte sequence is inserted.</dd>
- <dd><code>code</code> - inserted bytecode sequence.</dd>
- <dt><span class="throwsLabel">Throws:</span></dt>
- <dd><code><a href="../../javassist/bytecode/BadBytecode.html" title="class in javassist.bytecode">BadBytecode</a></code></dd>
- </dl>
- </li>
- </ul>
- <a name="insertAt-int-byte:A-">
- <!-- -->
- </a>
- <ul class="blockList">
- <li class="blockList">
- <h4>insertAt</h4>
- <pre>public int insertAt​(int pos,
- byte[] code)
- throws <a href="../../javassist/bytecode/BadBytecode.html" title="class in javassist.bytecode">BadBytecode</a></pre>
- <div class="block">Inserts the given bytecode sequence
- before the instruction at the given index <code>pos</code>.
- Branch offsets and the exception table are also updated.
-
- <p>If the instruction at the given index is at the beginning
- of a block statement,
- then the bytecode is inserted within that block.
-
- <p>An extra gap may be inserted at the end of the inserted
- bytecode sequence for adjusting alignment if the code attribute
- includes <code>LOOKUPSWITCH</code> or <code>TABLESWITCH</code>.</div>
- <dl>
- <dt><span class="paramLabel">Parameters:</span></dt>
- <dd><code>pos</code> - the index at which a byte sequence is inserted.</dd>
- <dd><code>code</code> - inserted bytecode sequence.</dd>
- <dt><span class="returnLabel">Returns:</span></dt>
- <dd>the index indicating the first byte of the
- inserted byte sequence, which might be
- different from pos.</dd>
- <dt><span class="throwsLabel">Throws:</span></dt>
- <dd><code><a href="../../javassist/bytecode/BadBytecode.html" title="class in javassist.bytecode">BadBytecode</a></code></dd>
- <dt><span class="simpleTagLabel">Since:</span></dt>
- <dd>3.11</dd>
- </dl>
- </li>
- </ul>
- <a name="insertEx-byte:A-">
- <!-- -->
- </a>
- <ul class="blockList">
- <li class="blockList">
- <h4>insertEx</h4>
- <pre>public int insertEx​(byte[] code)
- throws <a href="../../javassist/bytecode/BadBytecode.html" title="class in javassist.bytecode">BadBytecode</a></pre>
- <div class="block">Inserts the given bytecode sequence exclusively
- before the next instruction that would be returned by
- <code>next()</code> (not before the instruction returned
- by tha last call to <code>next()</code>).
- Branch offsets and the exception table are also updated.
-
- <p>If the next instruction is at the beginning of a block statement,
- then the bytecode is excluded from that block.
-
- <p>An extra gap may be inserted at the end of the inserted
- bytecode sequence for adjusting alignment if the code attribute
- includes <code>LOOKUPSWITCH</code> or <code>TABLESWITCH</code>.</div>
- <dl>
- <dt><span class="paramLabel">Parameters:</span></dt>
- <dd><code>code</code> - inserted bytecode sequence.</dd>
- <dt><span class="returnLabel">Returns:</span></dt>
- <dd>the index indicating the first byte of the
- inserted byte sequence.</dd>
- <dt><span class="throwsLabel">Throws:</span></dt>
- <dd><code><a href="../../javassist/bytecode/BadBytecode.html" title="class in javassist.bytecode">BadBytecode</a></code></dd>
- </dl>
- </li>
- </ul>
- <a name="insertEx-int-byte:A-">
- <!-- -->
- </a>
- <ul class="blockList">
- <li class="blockList">
- <h4>insertEx</h4>
- <pre>public void insertEx​(int pos,
- byte[] code)
- throws <a href="../../javassist/bytecode/BadBytecode.html" title="class in javassist.bytecode">BadBytecode</a></pre>
- <div class="block">Inserts the given bytecode sequence exclusively
- before the instruction at the given index <code>pos</code>.
- Branch offsets and the exception table are also updated.
-
- <p>If the instruction at the given index is at the beginning
- of a block statement,
- then the bytecode is excluded from that block.
-
- <p>An extra gap may be inserted at the end of the inserted
- bytecode sequence for adjusting alignment if the code attribute
- includes <code>LOOKUPSWITCH</code> or <code>TABLESWITCH</code>.
-
- <p>The index at which the byte sequence is actually inserted
- might be different from pos since some other bytes might be
- inserted at other positions (e.g. to change <code>GOTO</code>
- to <code>GOTO_W</code>).</div>
- <dl>
- <dt><span class="paramLabel">Parameters:</span></dt>
- <dd><code>pos</code> - the index at which a byte sequence is inserted.</dd>
- <dd><code>code</code> - inserted bytecode sequence.</dd>
- <dt><span class="throwsLabel">Throws:</span></dt>
- <dd><code><a href="../../javassist/bytecode/BadBytecode.html" title="class in javassist.bytecode">BadBytecode</a></code></dd>
- </dl>
- </li>
- </ul>
- <a name="insertExAt-int-byte:A-">
- <!-- -->
- </a>
- <ul class="blockList">
- <li class="blockList">
- <h4>insertExAt</h4>
- <pre>public int insertExAt​(int pos,
- byte[] code)
- throws <a href="../../javassist/bytecode/BadBytecode.html" title="class in javassist.bytecode">BadBytecode</a></pre>
- <div class="block">Inserts the given bytecode sequence exclusively
- before the instruction at the given index <code>pos</code>.
- Branch offsets and the exception table are also updated.
-
- <p>If the instruction at the given index is at the beginning
- of a block statement,
- then the bytecode is excluded from that block.
-
- <p>An extra gap may be inserted at the end of the inserted
- bytecode sequence for adjusting alignment if the code attribute
- includes <code>LOOKUPSWITCH</code> or <code>TABLESWITCH</code>.</div>
- <dl>
- <dt><span class="paramLabel">Parameters:</span></dt>
- <dd><code>pos</code> - the index at which a byte sequence is inserted.</dd>
- <dd><code>code</code> - inserted bytecode sequence.</dd>
- <dt><span class="returnLabel">Returns:</span></dt>
- <dd>the index indicating the first byte of the
- inserted byte sequence, which might be
- different from pos.</dd>
- <dt><span class="throwsLabel">Throws:</span></dt>
- <dd><code><a href="../../javassist/bytecode/BadBytecode.html" title="class in javassist.bytecode">BadBytecode</a></code></dd>
- <dt><span class="simpleTagLabel">Since:</span></dt>
- <dd>3.11</dd>
- </dl>
- </li>
- </ul>
- <a name="insertGap-int-">
- <!-- -->
- </a>
- <ul class="blockList">
- <li class="blockList">
- <h4>insertGap</h4>
- <pre>public int insertGap​(int length)
- throws <a href="../../javassist/bytecode/BadBytecode.html" title="class in javassist.bytecode">BadBytecode</a></pre>
- <div class="block">Inserts a gap
- before the next instruction that would be returned by
- <code>next()</code> (not before the instruction returned
- by the last call to <code>next()</code>).
- Branch offsets and the exception table are also updated.
- The inserted gap is filled with NOP. The gap length may be
- extended to a multiple of 4.
-
- <p>If the next instruction is at the beginning of a block statement,
- then the gap is inserted within that block.</div>
- <dl>
- <dt><span class="paramLabel">Parameters:</span></dt>
- <dd><code>length</code> - gap length</dd>
- <dt><span class="returnLabel">Returns:</span></dt>
- <dd>the index indicating the first byte of the inserted gap.</dd>
- <dt><span class="throwsLabel">Throws:</span></dt>
- <dd><code><a href="../../javassist/bytecode/BadBytecode.html" title="class in javassist.bytecode">BadBytecode</a></code></dd>
- </dl>
- </li>
- </ul>
- <a name="insertGap-int-int-">
- <!-- -->
- </a>
- <ul class="blockList">
- <li class="blockList">
- <h4>insertGap</h4>
- <pre>public int insertGap​(int pos,
- int length)
- throws <a href="../../javassist/bytecode/BadBytecode.html" title="class in javassist.bytecode">BadBytecode</a></pre>
- <div class="block">Inserts a gap in front of the instruction at the given
- index <code>pos</code>.
- Branch offsets and the exception table are also updated.
- The inserted gap is filled with NOP. The gap length may be
- extended to a multiple of 4.
-
- <p>If the instruction at the given index is at the beginning
- of a block statement,
- then the gap is inserted within that block.</div>
- <dl>
- <dt><span class="paramLabel">Parameters:</span></dt>
- <dd><code>pos</code> - the index at which a gap is inserted.</dd>
- <dd><code>length</code> - gap length.</dd>
- <dt><span class="returnLabel">Returns:</span></dt>
- <dd>the length of the inserted gap.
- It might be bigger than <code>length</code>.</dd>
- <dt><span class="throwsLabel">Throws:</span></dt>
- <dd><code><a href="../../javassist/bytecode/BadBytecode.html" title="class in javassist.bytecode">BadBytecode</a></code></dd>
- </dl>
- </li>
- </ul>
- <a name="insertExGap-int-">
- <!-- -->
- </a>
- <ul class="blockList">
- <li class="blockList">
- <h4>insertExGap</h4>
- <pre>public int insertExGap​(int length)
- throws <a href="../../javassist/bytecode/BadBytecode.html" title="class in javassist.bytecode">BadBytecode</a></pre>
- <div class="block">Inserts an exclusive gap
- before the next instruction that would be returned by
- <code>next()</code> (not before the instruction returned
- by the last call to <code>next()</code>).
- Branch offsets and the exception table are also updated.
- The inserted gap is filled with NOP. The gap length may be
- extended to a multiple of 4.
-
- <p>If the next instruction is at the beginning of a block statement,
- then the gap is excluded from that block.</div>
- <dl>
- <dt><span class="paramLabel">Parameters:</span></dt>
- <dd><code>length</code> - gap length</dd>
- <dt><span class="returnLabel">Returns:</span></dt>
- <dd>the index indicating the first byte of the inserted gap.</dd>
- <dt><span class="throwsLabel">Throws:</span></dt>
- <dd><code><a href="../../javassist/bytecode/BadBytecode.html" title="class in javassist.bytecode">BadBytecode</a></code></dd>
- </dl>
- </li>
- </ul>
- <a name="insertExGap-int-int-">
- <!-- -->
- </a>
- <ul class="blockList">
- <li class="blockList">
- <h4>insertExGap</h4>
- <pre>public int insertExGap​(int pos,
- int length)
- throws <a href="../../javassist/bytecode/BadBytecode.html" title="class in javassist.bytecode">BadBytecode</a></pre>
- <div class="block">Inserts an exclusive gap in front of the instruction at the given
- index <code>pos</code>.
- Branch offsets and the exception table are also updated.
- The inserted gap is filled with NOP. The gap length may be
- extended to a multiple of 4.
-
- <p>If the instruction at the given index is at the beginning
- of a block statement,
- then the gap is excluded from that block.</div>
- <dl>
- <dt><span class="paramLabel">Parameters:</span></dt>
- <dd><code>pos</code> - the index at which a gap is inserted.</dd>
- <dd><code>length</code> - gap length.</dd>
- <dt><span class="returnLabel">Returns:</span></dt>
- <dd>the length of the inserted gap.
- It might be bigger than <code>length</code>.</dd>
- <dt><span class="throwsLabel">Throws:</span></dt>
- <dd><code><a href="../../javassist/bytecode/BadBytecode.html" title="class in javassist.bytecode">BadBytecode</a></code></dd>
- </dl>
- </li>
- </ul>
- <a name="insertGapAt-int-int-boolean-">
- <!-- -->
- </a>
- <ul class="blockList">
- <li class="blockList">
- <h4>insertGapAt</h4>
- <pre>public <a href="../../javassist/bytecode/CodeIterator.Gap.html" title="class in javassist.bytecode">CodeIterator.Gap</a> insertGapAt​(int pos,
- int length,
- boolean exclusive)
- throws <a href="../../javassist/bytecode/BadBytecode.html" title="class in javassist.bytecode">BadBytecode</a></pre>
- <div class="block">Inserts an inclusive or exclusive gap in front of the instruction
- at the given index <code>pos</code>.
- Branch offsets and the exception table in the method body
- are also updated. The inserted gap is filled with NOP.
- The gap length may be extended to a multiple of 4.
-
- <p>Suppose that the instruction at the given index is at the
- beginning of a block statement. If the gap is inclusive,
- then it is included within that block. If the gap is exclusive,
- then it is excluded from that block.
-
- <p>The index at which the gap is actually inserted
- might be different from pos since some other bytes might be
- inserted at other positions (e.g. to change <code>GOTO</code>
- to <code>GOTO_W</code>). The index is available from the <code>Gap</code>
- object returned by this method.
-
- <p>Suppose that the gap is inserted at the position of
- the next instruction that would be returned by
- <code>next()</code> (not the last instruction returned
- by the last call to <code>next()</code>). The next
- instruction returned by <code>next()</code> after the gap is
- inserted is still the same instruction. It is not <code>NOP</code>
- at the first byte of the inserted gap.</div>
- <dl>
- <dt><span class="paramLabel">Parameters:</span></dt>
- <dd><code>pos</code> - the index at which a gap is inserted.</dd>
- <dd><code>length</code> - gap length.</dd>
- <dd><code>exclusive</code> - true if exclusive, otherwise false.</dd>
- <dt><span class="returnLabel">Returns:</span></dt>
- <dd>the position and the length of the inserted gap.</dd>
- <dt><span class="throwsLabel">Throws:</span></dt>
- <dd><code><a href="../../javassist/bytecode/BadBytecode.html" title="class in javassist.bytecode">BadBytecode</a></code></dd>
- <dt><span class="simpleTagLabel">Since:</span></dt>
- <dd>3.11</dd>
- </dl>
- </li>
- </ul>
- <a name="insert-javassist.bytecode.ExceptionTable-int-">
- <!-- -->
- </a>
- <ul class="blockList">
- <li class="blockList">
- <h4>insert</h4>
- <pre>public void insert​(<a href="../../javassist/bytecode/ExceptionTable.html" title="class in javassist.bytecode">ExceptionTable</a> et,
- int offset)</pre>
- <div class="block">Copies and inserts the entries in the given exception table
- at the beginning of the exception table in the code attribute
- edited by this object.</div>
- <dl>
- <dt><span class="paramLabel">Parameters:</span></dt>
- <dd><code>offset</code> - the value added to the code positions included
- in the entries.</dd>
- </dl>
- </li>
- </ul>
- <a name="append-byte:A-">
- <!-- -->
- </a>
- <ul class="blockList">
- <li class="blockList">
- <h4>append</h4>
- <pre>public int append​(byte[] code)</pre>
- <div class="block">Appends the given bytecode sequence at the end.</div>
- <dl>
- <dt><span class="paramLabel">Parameters:</span></dt>
- <dd><code>code</code> - the bytecode appended.</dd>
- <dt><span class="returnLabel">Returns:</span></dt>
- <dd>the position of the first byte of the appended bytecode.</dd>
- </dl>
- </li>
- </ul>
- <a name="appendGap-int-">
- <!-- -->
- </a>
- <ul class="blockList">
- <li class="blockList">
- <h4>appendGap</h4>
- <pre>public void appendGap​(int gapLength)</pre>
- <div class="block">Appends a gap at the end of the bytecode sequence.</div>
- <dl>
- <dt><span class="paramLabel">Parameters:</span></dt>
- <dd><code>gapLength</code> - gap length</dd>
- </dl>
- </li>
- </ul>
- <a name="append-javassist.bytecode.ExceptionTable-int-">
- <!-- -->
- </a>
- <ul class="blockListLast">
- <li class="blockList">
- <h4>append</h4>
- <pre>public void append​(<a href="../../javassist/bytecode/ExceptionTable.html" title="class in javassist.bytecode">ExceptionTable</a> et,
- int offset)</pre>
- <div class="block">Copies and appends the entries in the given exception table
- at the end of the exception table in the code attribute
- edited by this object.</div>
- <dl>
- <dt><span class="paramLabel">Parameters:</span></dt>
- <dd><code>offset</code> - the value added to the code positions included
- in the entries.</dd>
- </dl>
- </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/CodeIterator.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/CodeAttribute.RuntimeCopyException.html" title="class in javassist.bytecode"><span class="typeNameLink">Prev Class</span></a></li>
- <li><a href="../../javassist/bytecode/CodeIterator.Gap.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/CodeIterator.html" target="_top">Frames</a></li>
- <li><a href="CodeIterator.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>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 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>
|