[
https://jira.jboss.org/jira/browse/JASSIST-62?page=com.atlassian.jira.plu...
]
Yanic Inghelbrecht commented on JASSIST-62:
-------------------------------------------
I hadn't thought of "CtMethod.getReturnType()", I was using reflection to
deduce the type afterwards and patched it into the trace info my instrumentation code
gathers.
I was now able to remove that patchwork, which has simplified the tracing process.
Thanks!
make $type available in insertBefore
------------------------------------
Key: JASSIST-62
URL:
https://jira.jboss.org/jira/browse/JASSIST-62
Project: Javassist
Issue Type: Feature Request
Environment: javassist 3.7.1 (latest from cvs HEAD)
Reporter: Yanic Inghelbrecht
Assignee: 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:
https://jira.jboss.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira