<h2>Changes</h2>
+<p>-version 3.10
+
+<ul>
+ <li>JIRA JASSIST-69, 70
+</ul>
+
<p>-version 3.9 on October 9, 2008
<ul>
<li>ClassPool.makeClassIfNew(InputStream) was implemented.
iterator.append(b.getExceptionTable(), gapPos);
if (asFinally)
- ca.getExceptionTable().add(0, gapPos, gapPos, 0);
+ ca.getExceptionTable().add(getStartPosOfBody(ca), gapPos, gapPos, 0);
int gapLen = iterator.getCodeLength() - gapPos - handlerLen;
int subr = iterator.getCodeLength() - gapLen;
<br>4. <a href="tutorial2.html#intro">Introspection and customization</a>
<br>5. <a href="tutorial3.html#intro">Bytecode level API</a>
<br>6. <a href="tutorial3.html#generics">Generics</a>
+<br>7. <a href="tutorial3.html#j2me">J2ME</a>
</ul>
<p><br>
<p><a href="#generics">6. Generics</a>
+<p><a href="#j2me">7. J2ME</a>
+
<p><br>
<a name="intro">
<p><br>
+<h2><a name="j2me">7. J2ME</a></h2>
+
+<p>If you modify a class file for the J2ME execution environment,
+you must perform <it>preverification</it>. Preverifying is basically
+producing a stack map table, which was introduced into J2SE at JDK 1.6.
+However, Javassist does not automatically produce a stack map table
+for class files compiled by the J2ME compiler. You have to manually
+produce stack map tables for the modified methods.
+
+<p>For a given method represented by a <code>CtMethod</code> object <code>m</code>,
+you can produce a stack map table by calling the following methods:
+
+<ul><pre>
+m.getMethodInfo().rebuildStackMap(cpool);
+</pre></ul>
+
+<p>Here, <code>cpool</code> is a <code>ClassPool</code> object, which is
+available by calling <code>getClassPool()</code> on a <code>CtClass</code>
+object. A <code>ClassPool</code> object is responsible for finding
+class files from given class pathes.
+
+<p><br>
+
<a href="tutorial2.html">Previous page</a>
<hr>