[
http://jira.jboss.com/jira/browse/JASSIST-62?page=all ]
Shigeru Chiba resolved JASSIST-62.
----------------------------------
Resolution: Done
I updated insertBefore() so that $type will be available.
However, why do you need $type? CtMethod.getReturnType()
returns the return type. You can use this to change the source code
give to insertBefore().
make $type available in insertBefore
------------------------------------
Key: JASSIST-62
URL:
http://jira.jboss.com/jira/browse/JASSIST-62
Project: Javassist
Issue Type: Feature Request
Environment: javassist 3.7.1 (latest from cvs HEAD)
Reporter: Yanic Inghelbrecht
Assigned To: Shigeru Chiba
The tutorial explicitly mentions that $type is not available in CtMethod#insertBefore,
which is why I did not file this as a bug.
The problem is that it is impossible to determine the return type without support from
javassist, since there can be multiple methods in the same class with the same name and
parameter types but different return types (because of bridge methods to support covariant
return types).
The return type is to distinguish between the bridge methods and the originals. Again,
this is for a tool that performs run-time analysis of execution events, so it is important
it can accurately distinguish between method(calls). Currently the tool lumps together the
originals and bridges for lack of information, which is incorrect. So for me this is a
high priority bug / rfe.
A quick response as to whether or not this request is deemed feasible would be
appreciated - even if the implementation will take a while.
Thanks in advance.
Best regards,
Yanic
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira