I don't know what you mean by Jar fixup!? Use some Assert-like method calls tripped from the compiled classes? I don't care for that myself, but why not, if you can't use JDK 1.4. Real asserts are special (a keyword), because can be dealt with by the Jitter (AFAIK) to be completely removed from the compiled code (eventually), and can be turned on/off at a fine grained level, for troubleshooting deployed apps at the client side. Custom-made asserts are either IN or OUT of the bytecode, unless one does fancy class loading, which most apps stay away from. But that's just me ;-) --DD
-----Original Message----- From: Steve Loughran [mailto:[EMAIL PROTECTED] Sent: Monday, September 09, 2002 12:04 PM To: Ant Developers List Subject: Re: preprocessing java source ----- Original Message ----- From: "Dominique Devienne" <[EMAIL PROTECTED]> To: "'Ant Developers List'" <[EMAIL PROTECTED]> Sent: Monday, September 09, 2002 9:53 AM Subject: RE: preprocessing java source > That's the way to go, but without the reflection please!!! > > As Costin hammered out, you don't need reflection to deal with JDK specific > code (or platform), but simply to encapsulate dependent code (jdk or > platform) into various concrete implementations of an abstract type (class > or interface) defining all of the required functionalities. Then simply > select the right implementation at run-time, dynamically, using Java's great > dynamic loading abilities. > > Then in Ant's <javac>, conditionally include/compile/package the correct > code depending on the jdk/platform, as Ant does itself when compiling its > optional jar. > > This is the real reason you don't need pre-processors in Java. --DD but assert ; is a special case....it's nice to have them, yet the moment you use them you are bound to 1.4. Jon Skeet was bouncing round the idea of doing jar fixup though... -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]> -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>
