01: package org.acm.seguin.pmd.swingui;
02:
03: import java.text.MessageFormat;
04: import java.util.ResourceBundle;
05:
06: /**
07: *
08: * @author Donald A. Leckie
09: * @since September 9, 2002
10: * @version $Revision: 1.1 $, $Date: 2003/07/29 20:51:59 $
11: */
12: public class Resources {
13: private static ResourceBundle RESOURCES = ResourceBundle
14: .getBundle("org.acm.seguin.pmd.swingui.pmdViewer");
15:
16: /**
17: *********************************************************************************
18: *
19: * @param name
20: *
21: * @return
22: */
23: public static final String getString(String name) {
24: return RESOURCES.getString(name);
25: }
26:
27: /**
28: *********************************************************************************
29: *
30: * @param name
31: * @param parameters
32: *
33: * @return
34: */
35: public static final String getString(String name,
36: String[] parameters) {
37: String template = RESOURCES.getString(name);
38: String message = MessageFormat.format(template, parameters);
39:
40: return message;
41: }
42: }
|