Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>I don't know any existing tool for doing this. However there are patterns used on the android platform which could be used for your problem, in this case the <strong>R resource class pattern</strong> which generates a class from property files. So the file <code>my_stettings.properties</code>:</p> <pre><code>info=Lorem ipsum server=computer01 </code></pre> <p>should lead to a class like</p> <pre><code>public final class R { public static final int info=1; public static final int server=1; } </code></pre> <p>In this case you would use it with</p> <pre><code>ReadProperty.get(R.info); </code></pre> <p>which would not compile if the attribute is not available.</p> <ul> <li>This answer here <a href="https://stackoverflow.com/a/3004518/734687">https://stackoverflow.com/a/3004518/734687</a> generates an enum which is almost the same.</li> <li>This answer here <a href="https://stackoverflow.com/a/1578106/734687">https://stackoverflow.com/a/1578106/734687</a> uses an interface to access the values.</li> <li>This question here <a href="https://stackoverflow.com/questions/3065420/tool-for-checking-java-resource-bundles-i18n">Tool for checking Java resource bundles (i18n)</a> asks also for tools and provides a link to <a href="http://rscbundlecheck.sourceforge.net/" rel="nofollow noreferrer">http://rscbundlecheck.sourceforge.net/</a>. A German blog entry describes the usage here: <a href="http://www.catalysts.cc/wissenswertes/resourcebundle-checking/" rel="nofollow noreferrer">http://www.catalysts.cc/wissenswertes/resourcebundle-checking/</a></li> <li>Maven Resource Bundle Check Plugin runs some sanity checks on your resource files, see <a href="http://labs.consol.de/projects/maven/maven-rbc-plugin/" rel="nofollow noreferrer">http://labs.consol.de/projects/maven/maven-rbc-plugin/</a></li> <li>Compiler Assisted Localization provides a compile time check, see <a href="http://cal10n.qos.ch/" rel="nofollow noreferrer">http://cal10n.qos.ch/</a></li> </ul>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload