From 7cf3a5fce3acfd198867eb0f0aced97d40d83ecb Mon Sep 17 00:00:00 2001 From: chiba Date: Thu, 15 Oct 2009 10:32:49 +0000 Subject: for implementing StackMap attributes (JIRA 95) git-svn-id: http://anonsvn.jboss.org/repos/javassist/trunk@495 30ef5769-5b8d-40dd-aea6-55b5d6557bb3 --- tutorial/tutorial3.html | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) (limited to 'tutorial') diff --git a/tutorial/tutorial3.html b/tutorial/tutorial3.html index 4d7d2e27..d72a26c7 100644 --- a/tutorial/tutorial3.html +++ b/tutorial/tutorial3.html @@ -291,22 +291,24 @@ public Object get() { return value; }

If you modify a class file for the J2ME execution environment, you must perform preverification. 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. +producing stack maps, which is similar to stack map tables introduced +into J2SE at JDK 1.6. Javassist maintains the stack maps for J2ME only if +javassist.bytecode.MethodInfo.doPreverify is true. -

For a given method represented by a CtMethod object m, -you can produce a stack map table by calling the following methods: +

You can also manually +produce a stack map for a modified method. +For a given method represented by a CtMethod object m, +you can produce a stack map by calling the following methods:

Here, cpool is a ClassPool object, which is available by calling getClassPool() on a CtClass object. A ClassPool object is responsible for finding -class files from given class pathes. +class files from given class pathes. To obtain all the CtMethod +objects, call the getDeclaredMethods method on a CtClass object.


-- cgit v1.2.3