Java Mailing List Archive

http://www.ant-tasks.com/

Apache Ant Archive

» Ant Users List
» Ant Developers List
ANT task to process properties-files into static class

ANT task to process properties-files into static class

2007-01-02       - By Alexey N. Solofnenko
Reply:     1     2     3     4     5     6     7     8     9     10     >>  

It seems a trivial task to generate a Java source  file from a property
with <scripdef>.

- Alexey.

Rapthor wrote:
> Sorry, having confused you.
>
> I have a file named global.properties. This file is edited manually by me.
> The webapplication loads this file into a java.util.Properties-instance at
> start.
>
> Everywhere I use this Properties instance like "props.getProperty("myProp")"
> I have to check whether a "null" is returned or not. This check is at
> runtime! I wanted to see these at compile time. And that would be possible
> with a static class with attributes.
>  

--
------------------------------------------------------------------------
Alexey N. Solofnenko <http://trelony.cjb.net/>
Pleasant Hill, CA (GMT-8 usually)

©2008 ant-tasks.com - Jax Systems, LLC, U.S.A.