+ System.err.println("No bundle found for: " + bname);
+ resetMap(null);
+ }
+ }
+ }
+
+ /**
+ * Reset the backing map to the content of the given bundle, or empty if
+ * bundle is NULL.
+ *
+ * @param bundle
+ * the bundle to copy
+ */
+ private void resetMap(ResourceBundle bundle) {
+ this.map.clear();
+
+ if (bundle != null) {
+ for (E field : type.getEnumConstants()) {
+ try {
+ String value = bundle.getString(field.name());
+ this.map.put(field.name(),
+ value == null ? null : value.trim());
+ } catch (MissingResourceException e) {
+ }