01: package vqwiki.lex;
02:
03: import java.util.Locale;
04: import java.util.ResourceBundle;
05:
06: /**
07: * Returns general informations about the parser.
08: * @author boessu
09: */
10: public class ParserInfo {
11:
12: protected final String name;
13: protected final String version;
14: protected final String bundleName;
15:
16: public ParserInfo(String name, String version, String bundleName) {
17: this .name = name;
18: this .version = version;
19: this .bundleName = bundleName;
20: }
21:
22: /**
23: * @return name of the parser
24: */
25: public String getName() {
26: return name;
27: }
28:
29: /**
30: * @param loc localization for the language to use
31: * @return short description of the parser
32: */
33: public String getDescription(Locale loc) {
34: return ResourceBundle.getBundle(bundleName, loc).getString(
35: "parser.description");
36: }
37:
38: /**
39: * @return version of the parser.
40: */
41: public String getVersion() {
42: return version;
43: }
44: }
|