1 package org.objectweb.celtix.common.i18n; 2 3 import java.util.ResourceBundle ; 4 5 6 10 public final class BundleUtils { 11 14 private static final String MESSAGE_BUNDLE = ".Messages"; 15 16 19 private BundleUtils() { 20 } 21 22 28 public static String getBundleName(Class cls) { 29 return cls.getPackage().getName() + MESSAGE_BUNDLE; 30 } 31 32 38 public static ResourceBundle getBundle(Class cls) { 39 return ResourceBundle.getBundle(getBundleName(cls)); 40 } 41 } 42 | Popular Tags |