Browse Source

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
tags/rel_3_17_1_ga
chiba 15 years ago
parent
commit
e508ad78ca
3 changed files with 5 additions and 3 deletions
  1. 2
    1
      Readme.html
  2. 2
    2
      src/main/javassist/CtNewMethod.java
  3. 1
    0
      src/main/javassist/CtNewWrappedMethod.java

+ 2
- 1
Readme.html View File

@@ -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>


+ 2
- 2
src/main/javassist/CtNewMethod.java View File

@@ -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

+ 1
- 0
src/main/javassist/CtNewWrappedMethod.java View File

@@ -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);

Loading…
Cancel
Save