Package jenkins.util
Class ResourceBundleUtil
- java.lang.Object
-
- jenkins.util.ResourceBundleUtil
-
@Restricted(org.kohsuke.accmod.restrictions.NoExternalUse.class) public class ResourceBundleUtil extends Object
SimpleResourceBundle
utility class.- Since:
- 2.0
- Author:
- tom.fennelly@gmail.com
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static net.sf.json.JSONObject
getBundle(String baseName)
Get a bundle JSON using the default Locale.static net.sf.json.JSONObject
getBundle(String baseName, Locale locale)
Get a bundle JSON using the supplied Locale.
-
-
-
Method Detail
-
getBundle
@NonNull public static net.sf.json.JSONObject getBundle(@NonNull String baseName) throws MissingResourceException
Get a bundle JSON using the default Locale.- Parameters:
baseName
- The bundle base name.- Returns:
- The bundle JSON.
- Throws:
MissingResourceException
- Missing resource bundle.
-
getBundle
@NonNull public static net.sf.json.JSONObject getBundle(@NonNull String baseName, @NonNull Locale locale) throws MissingResourceException
Get a bundle JSON using the supplied Locale.- Parameters:
baseName
- The bundle base name.locale
- The Locale.- Returns:
- The bundle JSON.
- Throws:
MissingResourceException
- Missing resource bundle.
-
-