com.flexive.shared
Class FxSharedUtils.BundleReference

java.lang.Object
  extended by com.flexive.shared.FxSharedUtils.BundleReference
Enclosing class:
FxSharedUtils

public static class FxSharedUtils.BundleReference
extends java.lang.Object

A resource bundle reference.


Constructor Summary
FxSharedUtils.BundleReference(java.lang.String baseName, java.net.URL resourceURL)
          Create a new bundle reference.
 
Method Summary
 java.lang.String getBaseName()
          Returns the base name of the resource bundle (e.g.
 java.util.ResourceBundle getBundle(java.util.Locale locale)
          Return the resource bundle in the given locale.
 java.lang.String getCacheKey(java.util.Locale locale)
          Return a cache key unique for this resource bundle and locale.
 java.net.URL getResourceURL()
          Returns the class loader to be used for loading the bundle.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FxSharedUtils.BundleReference

public FxSharedUtils.BundleReference(java.lang.String baseName,
                                     java.net.URL resourceURL)
Create a new bundle reference.

Parameters:
baseName - the fully qualified base name (e.g. "ApplicationResources")
resourceURL - the resource URL to be used for loading the resource bundle. If null, the context class loader will be used.
Method Detail

getBaseName

public java.lang.String getBaseName()
Returns the base name of the resource bundle (e.g. "ApplicationResources").

Returns:
the base name of the resource bundle (e.g. "ApplicationResources").

getResourceURL

public java.net.URL getResourceURL()
Returns the class loader to be used for loading the bundle.

Returns:
the class loader to be used for loading the bundle.

getBundle

public java.util.ResourceBundle getBundle(java.util.Locale locale)
Return the resource bundle in the given locale.

Parameters:
locale - the requested locale
Returns:
the resource bundle in the given locale.

getCacheKey

public java.lang.String getCacheKey(java.util.Locale locale)
Return a cache key unique for this resource bundle and locale.

Parameters:
locale - the requested locale
Returns:
a cache key unique for this resource bundle and locale.