PropJoe
Posted on March 18th, 2008 by pcal
I have long had this irritating problem with .properties. It goes something like this:
- I like to use
.propertiesfiles for configuration unless there is a compelling reason to use something more complicated. - I'm pretty uptight about using constants in my code. This includes using constants to refer to the names of properties in a
.propertiesfile. - Over time, the constants and the
.propertiesfile can drift apart - you have to keep them both in sync. - Similarly, properly documenting them both becomes a painful
So, I proceeded to finally do something about it. I spent about 15 minutes writing the code and 45 minutes writing the documentation, go figure why. Maybe it's because The Wire is over and I think I just needed to do something to say goodbye. At any rate, I have found it has made my life just a little bit easier.
With that, I give you, PropJoe.
Hey Pcal,
Nice little util. I was using something similar for log messages but the annotations were being processed using reflection. Using the doclet approach is lighter weight and simple.
hey nagesh, good to hear from you. yeah, sometimes the simplest things make life easier.