
Signature
Joe Seigh
When you get lemons, you make lemonade.
When you get hardware, you make software.
> Is there any way of forcing local scoping that's a little cleaner
> than using an anonymous inner class? I need to be able to enforce
> some before entering block and after entering block actions.
> Anonymous inner classes seem a little kludgy.
I don't think they are a kludge (well other than the implementation into
the class file format). It's just the syntax is highly verbose for a
simple ExecuteAround.
You could generate a proxy for appropriately annotated methods, but that
would be even more of a kludge.
Tom Hawtin
Joe Seigh - 05 Feb 2007 11:01 GMT
>> Is there any way of forcing local scoping that's a little cleaner
>> than using an anonymous inner class? I need to be able to enforce
[quoted text clipped - 7 lines]
> You could generate a proxy for appropriately annotated methods, but that
> would be even more of a kludge.
Plus it's not really a block but a method call so you lose local variable
scoping. Ah well, I'll probably just go with requiring the user to use
enter and exit block actions in a try/finally block. Thanks anyway.

Signature
Joe Seigh
When you get lemons, you make lemonade.
When you get hardware, you make software.