diff options
author | chiba <chiba@30ef5769-5b8d-40dd-aea6-55b5d6557bb3> | 2008-09-09 10:32:05 +0000 |
---|---|---|
committer | chiba <chiba@30ef5769-5b8d-40dd-aea6-55b5d6557bb3> | 2008-09-09 10:32:05 +0000 |
commit | e508ad78ca0df9329dcf4873f4e4614e31e4a1bc (patch) | |
tree | 555f6f9cf646b11c47f9d57aa5f56de9c344cc9e /src | |
parent | 8b65a057e9829a84cfd00fe5de98fe94ccc1d2f0 (diff) | |
download | javassist-e508ad78ca0df9329dcf4873f4e4614e31e4a1bc.tar.gz javassist-e508ad78ca0df9329dcf4873f4e4614e31e4a1bc.zip |
The method implicitly appended by CtNewMethod.wrapped() now has a synthetic attribute.
git-svn-id: http://anonsvn.jboss.org/repos/javassist/trunk@456 30ef5769-5b8d-40dd-aea6-55b5d6557bb3
Diffstat (limited to 'src')
-rw-r--r-- | src/main/javassist/CtNewMethod.java | 4 | ||||
-rw-r--r-- | src/main/javassist/CtNewWrappedMethod.java | 1 |
2 files changed, 3 insertions, 2 deletions
diff --git a/src/main/javassist/CtNewMethod.java b/src/main/javassist/CtNewMethod.java index 0e36ce75..2911484a 100644 --- a/src/main/javassist/CtNewMethod.java +++ b/src/main/javassist/CtNewMethod.java @@ -357,7 +357,7 @@ public class CtNewMethod { * Creates a wrapped method. The wrapped method receives parameters * in the form of an array of <code>Object</code>. * - * <p>The body of the created method is a copy of the body of a method + * <p>The body of the created method is a copy of the body of the method * specified by <code>body</code>. However, it is wrapped in * parameter-conversion code. * @@ -423,7 +423,7 @@ public class CtNewMethod { * <ul><pre>public class intVector extends java.util.Vector { * public void add(int p0) { * Object[] args = new Object[] { p0 }; - * // begin of copied body + * // begin of the copied body * super.addElement(args[0]); * Object result = null; * // end diff --git a/src/main/javassist/CtNewWrappedMethod.java b/src/main/javassist/CtNewWrappedMethod.java index 45916de9..94cabd60 100644 --- a/src/main/javassist/CtNewWrappedMethod.java +++ b/src/main/javassist/CtNewWrappedMethod.java @@ -149,6 +149,7 @@ class CtNewWrappedMethod { map); int acc = body.getAccessFlags(); body.setAccessFlags(AccessFlag.setPrivate(acc)); + body.addAttribute(new SyntheticAttribute(classfile.getConstPool())); // a stack map is copied. rebuilding it is not needed. classfile.addMethod(body); bodies.put(src, bodyname); |