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 }
14 catch (final MissingResourceException e) {
15 return fallback;
16 }
17 }
18
19 private static ResourceBundle getResourceBundle() {
20 if (resourceBundle == null) {
21 resourceBundle = ResourceBundle.getBundle(BUNDLE_NAME);
22 }
23 return resourceBundle;
24 }
25
26 public static String getFullVersionNumber() {
27 return getString("Version.version", ""); //$NON-NLS-1$ //$NON-NLS-2$
28 }
29
30 public static String getBuildDate() {
31 return getString("Version.buildDate", ""); //$NON-NLS-1$ //$NON-NLS-2$
32 }
33
34 public final static String getJava2HtmlConverterTitle() {
35 return "Java2Html Converter " + getFullVersionNumber();
36 }
37
38 public final static String getJava2HtmlAppletTitle() {
39 return "Java2Html Applet " + getFullVersionNumber();
40 }
41 }
|