ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Steve Loughran" <stev...@iseran.com>
Subject Re: preprocessing java source
Date Mon, 09 Sep 2002 17:04:22 GMT

----- Original Message -----
From: "Dominique Devienne" <DDevienne@lgc.com>
To: "'Ant Developers List'" <ant-dev@jakarta.apache.org>
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:ant-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:ant-dev-help@jakarta.apache.org>


Mime
View raw message