Package jenkins.util

Class ResourceBundleUtil

java.lang.Object
jenkins.util.ResourceBundleUtil

@Restricted(org.kohsuke.accmod.restrictions.NoExternalUse.class) public final class ResourceBundleUtil extends Object
Simple ResourceBundle utility class.
Since:
2.0
Author:
tom.fennelly@gmail.com
  • Method Details

    • 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.