KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > de > uka > ipd > coverage > junit > Messages


1 /*
2  * Created on Jun 8, 2005
3  *
4  * written by Matthias Kempka
5  */

6 package de.uka.ipd.coverage.junit;
7
8 import java.util.MissingResourceException JavaDoc;
9 import java.util.ResourceBundle JavaDoc;
10
11 /**
12  * Created on Jun 8, 2005
13  * @author Matthias Kempka
14  */

15 public class Messages {
16     private static final String JavaDoc BUNDLE_NAME = "de.uka.ipd.coverage.junit.messages";//$NON-NLS-1$
17

18     private static final ResourceBundle JavaDoc RESOURCE_BUNDLE = ResourceBundle
19             .getBundle(BUNDLE_NAME);
20
21     private Messages() {
22     }
23
24     public static String JavaDoc getString(String JavaDoc key) {
25         // TODO Auto-generated method stub
26
try {
27             return RESOURCE_BUNDLE.getString(key);
28         } catch (MissingResourceException JavaDoc e) {
29             return '!' + key + '!';
30         }
31     }
32 }
33
Popular Tags