diff options
-rw-r--r-- | Readme.html | 6 | ||||
-rw-r--r-- | src/main/javassist/CtBehavior.java | 2 | ||||
-rw-r--r-- | tutorial/tutorial.html | 1 | ||||
-rw-r--r-- | tutorial/tutorial3.html | 25 |
4 files changed, 33 insertions, 1 deletions
diff --git a/Readme.html b/Readme.html index 9feca8dc..69f91454 100644 --- a/Readme.html +++ b/Readme.html @@ -281,6 +281,12 @@ see javassist.Dump. <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. diff --git a/src/main/javassist/CtBehavior.java b/src/main/javassist/CtBehavior.java index 798ecab1..528e14b7 100644 --- a/src/main/javassist/CtBehavior.java +++ b/src/main/javassist/CtBehavior.java @@ -746,7 +746,7 @@ public abstract class CtBehavior extends CtMember { 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; diff --git a/tutorial/tutorial.html b/tutorial/tutorial.html index 87027d62..1d8dbc74 100644 --- a/tutorial/tutorial.html +++ b/tutorial/tutorial.html @@ -24,6 +24,7 @@ Shigeru Chiba <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> diff --git a/tutorial/tutorial3.html b/tutorial/tutorial3.html index 418ef719..4d7d2e27 100644 --- a/tutorial/tutorial3.html +++ b/tutorial/tutorial3.html @@ -24,6 +24,8 @@ <p><a href="#generics">6. Generics</a> +<p><a href="#j2me">7. J2ME</a> + <p><br> <a name="intro"> @@ -285,6 +287,29 @@ public Object get() { return value; } <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> |