Browse Source

for fixing JASSIST-70


git-svn-id: http://anonsvn.jboss.org/repos/javassist/trunk@463 30ef5769-5b8d-40dd-aea6-55b5d6557bb3
tags/rel_3_17_1_ga
chiba 15 years ago
parent
commit
df66d916e0
4 changed files with 33 additions and 1 deletions
  1. 6
    0
      Readme.html
  2. 1
    1
      src/main/javassist/CtBehavior.java
  3. 1
    0
      tutorial/tutorial.html
  4. 25
    0
      tutorial/tutorial3.html

+ 6
- 0
Readme.html View File

@@ -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.

+ 1
- 1
src/main/javassist/CtBehavior.java View File

@@ -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;

+ 1
- 0
tutorial/tutorial.html View File

@@ -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>

+ 25
- 0
tutorial/tutorial3.html View File

@@ -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>

Loading…
Cancel
Save