summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Readme.html3
-rw-r--r--src/main/javassist/CtNewMethod.java4
-rw-r--r--src/main/javassist/CtNewWrappedMethod.java1
3 files changed, 5 insertions, 3 deletions
diff --git a/Readme.html b/Readme.html
index 890b39e4..a1310be6 100644
--- a/Readme.html
+++ b/Readme.html
@@ -283,7 +283,8 @@ see javassist.Dump.
<p>-version 3.9
<ul>
- <li>CtNewMethod.wrapped(..) implicitly appends a method like _added_m$0.
+ <li>CtNewMethod.wrapped(..) and CtNewConstructor.wrapped(..)
+ implicitly append a method like _added_m$0.
This method now has a synthetic attribute.
</ul>
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);