com.taco.util
Class ChainedResourceBundleFactory.ChainedResourceBundle

java.lang.Object
  extended by java.util.ResourceBundle
      extended by com.taco.util.AccessibleResourceBundle
          extended by com.taco.util.CachedKeysResourceBundle
              extended by com.taco.util.AccessibleResourceBundleAdapter
                  extended by 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.


Field Summary
 
Fields inherited from class com.taco.util.AccessibleResourceBundleAdapter
_bundle
 
Fields inherited from class com.taco.util.CachedKeysResourceBundle
_cachedKeySet, _keySetRef, _useSoftCache
 
Fields inherited from class com.taco.util.AccessibleResourceBundle
_isParentSet, _locale
 
Fields inherited from class java.util.ResourceBundle
parent
 
Constructor Summary
ChainedResourceBundleFactory.ChainedResourceBundle(java.util.ResourceBundle bundle)
          Create a new resource bundle that contains the argument bundle and has no parent bundle.
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.
 
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 com.taco.util.AccessibleResourceBundleAdapter
_getProperKeys, makeAccessibleBundle
 
Methods inherited from class com.taco.util.CachedKeysResourceBundle
getKeys, getUseSoftCache, invalidateCache, setUseSoftCache
 
Methods inherited from class com.taco.util.AccessibleResourceBundle
getLocale, getParent, setLocale, setParent
 
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
 

Constructor Detail

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.

Method Detail

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