title: Generate string constants from properties file keys
body: <p>I'm using .properties files for message internationalization. For example:</p>
  
  <pre><code>HELLO_WORLD = Hello World
  HELLO_UNIVERSE = Hello Universe
  </code></pre>
  
  <p>And then in Java code:</p>
  
  <pre><code>String foo = resourceBundle.getString("HELLO_WORLD");
  </code></pre>
  
  <p>String literals like <code>"HELLO_WORLD"</code> are problematic because they're error-prone and can't be autocompleted. I'd like to generate code from the keys in the properties file like this:</p>
  
  <pre><code>public interface Messages { // Or abstract class with private constructor
      public static final String HELLO_WORLD = "HELLO_WORLD";
      public static final String HELLO_UNIVERSE = "HELLO_UNIVERSE";
  }
  </code></pre>
  
  <p>And then use it like this:</p>
  
  <pre><code>String foo = resourceBundle.getString(Messages.HELLO_WORLD);
  </code></pre>
  
  <p>Is there a standard way to do this? I prefer a Maven plugin, but any stand-alone tool that I can run manually would be good enough for my needs.</p>