diff options
author | chiba <chiba@30ef5769-5b8d-40dd-aea6-55b5d6557bb3> | 2008-12-07 07:17:53 +0000 |
---|---|---|
committer | chiba <chiba@30ef5769-5b8d-40dd-aea6-55b5d6557bb3> | 2008-12-07 07:17:53 +0000 |
commit | df66d916e0adcfb7245be6fc032ad4ae2969468d (patch) | |
tree | 9344109356ef452f79a6067434b61537d6c33cb5 /tutorial | |
parent | 594329d26539dae967b962fb89baa8b374a6b06d (diff) | |
download | javassist-df66d916e0adcfb7245be6fc032ad4ae2969468d.tar.gz javassist-df66d916e0adcfb7245be6fc032ad4ae2969468d.zip |
for fixing JASSIST-70
git-svn-id: http://anonsvn.jboss.org/repos/javassist/trunk@463 30ef5769-5b8d-40dd-aea6-55b5d6557bb3
Diffstat (limited to 'tutorial')
-rw-r--r-- | tutorial/tutorial.html | 1 | ||||
-rw-r--r-- | tutorial/tutorial3.html | 25 |
2 files changed, 26 insertions, 0 deletions
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> |