PropJoe

I have long had this irritating problem with .properties. It goes something like this:

  • I like to use .properties files 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 .properties file.
  • Over time, the constants and the .properties file 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.

docs | download

2 Responses to “PropJoe”

  1. 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.

  2. hey nagesh, good to hear from you. yeah, sometimes the simplest things make life easier. ;)