[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: A java DEBUG flag

From: Mark Wielaard
Subject: Re: A java DEBUG flag
Date: Thu, 23 Nov 2000 09:52:40 +0100
User-agent: Mutt/1.2.5i


On Thu, Nov 23, 2000 at 06:06:12PM +1300, Bryce McKinlay wrote:
> I think it would be useful to have a java file somewhere that defines
> constants which can be used to enable/disable bits of java code at
> compile time. The serialized object dumping facility in
> ObjectInputStream, for example, currently adds a lot of overhead even
> when its turned off, because the java code makes calls into native code
> regardless of whether debugging is enabled or not. By setting a constant
> somewhere, the compiler can optimize it out when not doing a debug
> build.
Does it has to be a compile time constansts?
I would like to be able to have a class library where I could selectively
turn on/off some debugging code at runtime. If we used something like
System.getProperty("") to set these
constants (you can even do that in an interface) then at runtime the
user could do a to turn on
the debugging. (It should at least be an option to have these 'constants'
compiled in so they can be set dynamicly at runtime IMHO.)



reply via email to

[Prev in Thread] Current Thread [Next in Thread]