File: /Users/shatabdi/Education/GitHub/se450_project/src/model/shape/Messages.java

1     package model.shape;
2     
3     import java.util.MissingResourceException;
4     import java.util.ResourceBundle;
5     
6     public class Messages {
7     	private static final String BUNDLE_NAME = "model.shape.messages"; //$NON-NLS-1$
8     
9     	private static final ResourceBundle RESOURCE_BUNDLE = ResourceBundle.getBundle(BUNDLE_NAME);
10     
11     	private Messages() {
12     	}
13     
14     	public static String getString(String key) {
15     		try {
16     			return RESOURCE_BUNDLE.getString(key);
17     		} catch (MissingResourceException e) {
18     			return '!' + key + '!';
19     		}
20     	}
21     }
22