com.taco.util
Class ChainedResourceBundleFactory.ChainedResourceBundle
java.lang.Object
java.util.ResourceBundle
com.taco.util.AccessibleResourceBundle
com.taco.util.CachedKeysResourceBundle
com.taco.util.AccessibleResourceBundleAdapter
com.taco.util.ChainedResourceBundleFactory.ChainedResourceBundle
- Enclosing class:
- ChainedResourceBundleFactory
protected static class ChainedResourceBundleFactory.ChainedResourceBundle
- extends AccessibleResourceBundleAdapter
A resource bundle that maps method calls to a contained resource
bundle, except that its parent chain may continue after the contained
resource bundle's chain ends.
Fields inherited from class java.util.ResourceBundle |
parent |
Method Summary |
protected java.lang.Object |
handleGetObject(java.lang.String key)
Because handleGetObject() is protected, we can't
invoke it on the contained bundle. |
Methods inherited from class java.util.ResourceBundle |
getBundle, getBundle, getBundle, getObject, getString, getStringArray |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ChainedResourceBundleFactory.ChainedResourceBundle
public ChainedResourceBundleFactory.ChainedResourceBundle(java.util.ResourceBundle bundle)
- Create a new resource bundle that contains the argument bundle
and has no parent bundle.
ChainedResourceBundleFactory.ChainedResourceBundle
public ChainedResourceBundleFactory.ChainedResourceBundle(java.util.ResourceBundle bundle,
java.util.ResourceBundle parent)
- Create a new resource bundle that contains the argument bundle
and has the argument surrogate parent.
handleGetObject
protected java.lang.Object handleGetObject(java.lang.String key)
- Because
handleGetObject()
is protected, we can't
invoke it on the contained bundle. Instead, we use
getObject()
, which will use the parent chain of the
contained bundle. That actually works fine, but that means when
getObject()
delegates to the parent, the parent should
not be any of the bundles in the parent chain of the contained
bundle. Instead, it should point the surrogate parent.
- Overrides:
handleGetObject
in class AccessibleResourceBundleAdapter