org.kohsuke.stapler.jelly
Class ResourceBundle

java.lang.Object
  extended by org.kohsuke.stapler.jelly.ResourceBundle

public class ResourceBundle
extends java.lang.Object

Cache of localization strings.

Author:
Kohsuke Kawaguchi

Constructor Summary
ResourceBundle(java.lang.String baseName)
           
 
Method Summary
protected  void clearCache()
           
 boolean equals(java.lang.Object o)
           
 java.lang.String format(java.util.Locale locale, java.lang.String key, java.lang.Object... args)
           
protected  java.util.Properties get(java.lang.String key)
           
 java.lang.String getBaseName()
           
 java.lang.String getFormatString(java.util.Locale locale, java.lang.String key)
          Gets the format string for the given key.
 java.lang.String getFormatStringWithoutDefaulting(java.util.Locale locale, java.lang.String key)
          Works like getFormatString(Locale, String) except there's no searching up the delegation chain.
 int hashCode()
           
static ResourceBundle load(java.lang.String jellyUrl)
          Loads the resource bundle associated with the Jelly script.
static ResourceBundle load(java.net.URL jellyUrl)
           
protected  java.util.Properties wrapUp(java.lang.String locale, java.util.Properties props)
          Interception point for property loading.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ResourceBundle

public ResourceBundle(java.lang.String baseName)
Method Detail

getBaseName

public java.lang.String getBaseName()

format

public java.lang.String format(java.util.Locale locale,
                               java.lang.String key,
                               java.lang.Object... args)

getFormatString

public java.lang.String getFormatString(java.util.Locale locale,
                                        java.lang.String key)
Gets the format string for the given key.

This method performs a search so that a look up for "pt_BR" would delegate to "pt" then "" (the no-locale locale.)


getFormatStringWithoutDefaulting

public java.lang.String getFormatStringWithoutDefaulting(java.util.Locale locale,
                                                         java.lang.String key)
Works like getFormatString(Locale, String) except there's no searching up the delegation chain.


clearCache

protected void clearCache()

get

protected java.util.Properties get(java.lang.String key)

wrapUp

protected java.util.Properties wrapUp(java.lang.String locale,
                                      java.util.Properties props)
Interception point for property loading.


equals

public boolean equals(java.lang.Object o)
Overrides:
equals in class java.lang.Object

hashCode

public int hashCode()
Overrides:
hashCode in class java.lang.Object

load

public static ResourceBundle load(java.net.URL jellyUrl)

load

public static ResourceBundle load(java.lang.String jellyUrl)
Loads the resource bundle associated with the Jelly script.



Copyright © 2011. All Rights Reserved.