[jboss-jira] [JBoss JIRA] (JASSIST-197) Method parameters can not be accessed when using MethodCall.replace
Ross Allan (JIRA)
jira-events at lists.jboss.org
Wed May 22 15:20:06 EDT 2013
[ https://issues.jboss.org/browse/JASSIST-197?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12776141#comment-12776141 ]
Ross Allan commented on JASSIST-197:
------------------------------------
public void example(SomeInterface a, ...) {
// Some code.
<something>.postEvent(someEventObject);
// Some code.
}
I am then replacing the method call to postEvent, and need to access both the parameter someEventObject of postEvent, and the SomeInterface parameter "a" of the example method.
This is a simplified example, and the patch must be applied to multiple versions of the 'example' method, so simply replacing the entire method content is not an option.
I tried to implement it myself, but many of the methods/fields used via MethodCall.replace aren't public, so it quickly turned into a mess of reflection just to make a (probably) small change.
> Method parameters can not be accessed when using MethodCall.replace
> -------------------------------------------------------------------
>
> Key: JASSIST-197
> URL: https://issues.jboss.org/browse/JASSIST-197
> Project: Javassist
> Issue Type: Feature Request
> Affects Versions: 3.17.1-GA
> Reporter: Ross Allan
> Assignee: Shigeru Chiba
>
> When instrumenting and using MethodCall.replace there does not seem to be any way to access the parameters of the method which the method call is in, it is only possible to access the parameters of the method call.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
More information about the jboss-jira
mailing list