<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>
* 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.
*
* <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
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);