01: package de.java2html;
02:
03: import java.util.MissingResourceException;
04: import java.util.ResourceBundle;
05:
06: public class Version {
07: private static final String BUNDLE_NAME = "de.java2html.version"; //$NON-NLS-1$
08: private static ResourceBundle resourceBundle;
09:
10: private static String getString(String key, String fallback) {
11: try {
12: return getResourceBundle().getString(key);
13: } catch (MissingResourceException e) {
14: return fallback;
15: }
16: }
17:
18: private static ResourceBundle getResourceBundle() {
19: if (resourceBundle == null) {
20: resourceBundle = ResourceBundle.getBundle(BUNDLE_NAME);
21: }
22: return resourceBundle;
23: }
24:
25: public static String getFullVersionNumber() {
26: return getString("Version.version", ""); //$NON-NLS-1$ //$NON-NLS-2$
27: }
28:
29: public static String getBuildDate() {
30: return getString("Version.buildDate", ""); //$NON-NLS-1$ //$NON-NLS-2$
31: }
32:
33: public final static String getJava2HtmlConverterTitle() {
34: return "Java2Html Converter " + getFullVersionNumber();
35: }
36:
37: public final static String getJava2HtmlAppletTitle() {
38: return "Java2Html Applet " + getFullVersionNumber();
39: }
40: }
|