Support annotations on private and package local methods#16
Support annotations on private and package local methods#16johngmyers wants to merge 2 commits intomartint:masterfrom
Conversation
|
I'm not sure I agree with this change. I generally dislike framework code that can magically "see" into private methods/state. There are some philosophical and some practical issues with allowing and encouraging this form. The intent of jmxutils is to make exposing objects via jmx easy, but not to be the canonical way to access or manage them. Today, a class that is annotated with From an implementation point of view, the call to setAccessible is problematic since it will not work when running within a SecurityManager. |
|
The placing of Testing of such methods should be through the framework, not directly through the method. Tests of the latter are incomplete, as they do not catch errors in annotation or naming. Furthermore, I would be willing to write code to handle running within a SecurityManager. |
Depends on pull #15
A jmxutils annotation on a method explicitly indicates the class's intent to have that method managed by jmxutils. It shouldn't also be necessary for the class to make that method callable by anybody else.