de.caff.gimmix
Class ResourceBundleCollection

java.lang.Object
  extended by java.util.ResourceBundle
      extended by de.caff.gimmix.ResourceBundleCollection

public class ResourceBundleCollection
extends java.util.ResourceBundle

Handle a collection of resource bundles. This allows parts of an application (e.g. beans) to maintain their own resource bundle but access to all these bundles is handled as an unit.

 

Field Summary
 
Fields inherited from class java.util.ResourceBundle
parent
 
Constructor Summary
ResourceBundleCollection()
           
 
Method Summary
 void addResourceBundle(java.util.ResourceBundle bundle)
          Add an resource bundle.
 java.util.Enumeration<java.lang.String> getKeys()
          Return an Enumeration of the keys.
protected  java.lang.Object handleGetObject(java.lang.String key)
          Must have method for getting the value for a key.
 void removeResourceBundle(java.util.ResourceBundle bundle)
          Remove a resource bundle.
 
Methods inherited from class java.util.ResourceBundle
getBundle, getBundle, getBundle, getLocale, getObject, getString, getStringArray, setParent
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ResourceBundleCollection

public ResourceBundleCollection()
Method Detail

addResourceBundle

public void addResourceBundle(java.util.ResourceBundle bundle)
Add an resource bundle. If this bundle defines an already defined resource, the old resource will be overwritten!

Parameters:
bundle - resource bundle to add

removeResourceBundle

public void removeResourceBundle(java.util.ResourceBundle bundle)
Remove a resource bundle.

Parameters:
bundle - resource bundle to remove

handleGetObject

protected java.lang.Object handleGetObject(java.lang.String key)
Must have method for getting the value for a key.

Specified by:
handleGetObject in class java.util.ResourceBundle
Parameters:
key - see description of java.util.ResourceBundle
Returns:
the value for the given key or null

getKeys

public java.util.Enumeration<java.lang.String> getKeys()
Return an Enumeration of the keys.

Specified by:
getKeys in class java.util.ResourceBundle
Returns:
enumeration of all keys from the collected tables.