Re: Proxy macro, and calling on a protected method

2010-01-24 Thread .Bill Smith
Thanks for correcting me. I agree you would need to hang on to the Method object. On Jan 24, 5:09 pm, "Steven E. Harris" wrote: > ".Bill Smith" writes: > > you can use java.lang.reflect.Method.setAccessible to make an > > otherwise protected method available for public access. > > It looks like

Re: Proxy macro, and calling on a protected method

2010-01-24 Thread Steven E. Harris
".Bill Smith" writes: > you can use java.lang.reflect.Method.setAccessible to make an > otherwise protected method available for public access. It looks like one would have to hang on to the Method object and reuse it, as setting one Method instance's accessibility has no influence over /other/

Re: Proxy macro, and calling on a protected method

2010-01-24 Thread .Bill Smith
This is using a sledgehammer to drive in a nail, but you can use java.lang.reflect.Method.setAccessible (http://java.sun.com/javase/7/ docs/api/java/lang/reflect/AccessibleObject.html#setAccessible %28boolean%29) to make an otherwise protected method available for public access. It's a sledgehamme

Proxy macro, and calling on a protected method

2010-01-24 Thread Steven E. Harris
The documentation for the `proxy' macro mentions lack of access in the defined implementation to protected members: ,[ proxy ] | Note that while method fns can be provided to override protected | methods, they have no other access to protected members, nor to super, | as these capabilities can