org.jboss.portal.common.i18n
Class ParentChildResourceBundle
java.lang.Object
java.util.ResourceBundle
org.jboss.portal.common.i18n.ParentChildResourceBundle
public class ParentChildResourceBundle
- extends java.util.ResourceBundle
This resource bundle takes two resource bundle to make one :
- The locale of this resource bundle is given by the child.
- For a given key present in the child and the parent, the child
value overrides the parent value.
The locale used for the bundle is the child locale.
- Version:
- $Revision: 6818 $
- Author:
- Julien Viet, Thomas Heute
Fields inherited from class java.util.ResourceBundle |
parent |
Constructor Summary |
ParentChildResourceBundle(java.util.ResourceBundle parent,
java.util.ResourceBundle child)
Construct a new resource bundle whose content is based on the child
and parent content. |
Methods inherited from class java.util.ResourceBundle |
getBundle, getBundle, getBundle, getObject, getString, getStringArray, setParent |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ParentChildResourceBundle
public ParentChildResourceBundle(java.util.ResourceBundle parent,
java.util.ResourceBundle child)
throws java.lang.IllegalArgumentException
- Construct a new resource bundle whose content is based on the child
and parent content.
- Parameters:
parent
- the parent eventually nullchild
- the child
- Throws:
java.lang.IllegalArgumentException
- if the child is null or its locale is null
getLocale
public java.util.Locale getLocale()
- Overrides:
getLocale
in class java.util.ResourceBundle
handleGetObject
protected java.lang.Object handleGetObject(java.lang.String key)
- Specified by:
handleGetObject
in class java.util.ResourceBundle
getKeys
public java.util.Enumeration getKeys()
- Specified by:
getKeys
in class java.util.ResourceBundle