Mikhail Fursov wrote:
> Yes, the main reason I love Java is a power of tools! If you force me to
> work in notepad instead of IDEA with the only reason that we need a
> preprocessor I will have a doubt if the solution is reasonable.

Agreed. And that is a reason why it makes sense to have the original
source code compilable (as Etienne raised) -- so basic Java tooling can
still work on the original code even when there are no pre-processor
helpers around (though of course that would be more painful for the
developer).

> BTW I see from the discussion that AspectJ is considered as possible
> solution. I'm not a guru in this extension of Java and AFAIK it 
> allows only to add method-entry/exits code. You can't add logging
> into the middle of the method. You can't change the method behaviour
> with it. So the question is: what an improvement we will have with
> AspectJ?

You can have pointcuts on a whole number of events, including method
invocations but also exception handling, field assignments and accesses,
etc.  But you can only add behavior, you cannot subtract from the
original code.

Regards,
Tim

-- 

Tim Ellison ([EMAIL PROTECTED])

Reply via email to