aicas logo Jamaica 3.4 release 8

sun.util.resources
Class OpenListResourceBundle

java.lang.Object
  extended by java.util.ResourceBundle
      extended by sun.util.resources.OpenListResourceBundle

public abstract class OpenListResourceBundle
extends ResourceBundle

Subclass of ResourceBundle which mimics ListResourceBundle, but provides more hooks for specialized subclass behavior. For general description, see ListResourceBundle.

This class leaves handleGetObject non-final, and adds a method createMap which allows subclasses to use specialized Map implementations.


Field Summary
 
Fields inherited from class java.util.ResourceBundle
parent
 
Constructor Summary
protected OpenListResourceBundle()
          Sole constructor.
 
Method Summary
protected  Map createMap(int size)
          Lets subclasses provide specialized Map implementations.
protected abstract  Object[][] getContents()
          See ListResourceBundle class description.
 Enumeration<String> getKeys()
          Implementation of ResourceBundle.getKeys.
 OpenListResourceBundle getParent()
          Returns the parent bundle
 Set<String> handleGetKeys()
          Returns a set of keys provided in this resource bundle
 Object handleGetObject(String key)
          Override this method to provide the resource for a keys.
 
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

OpenListResourceBundle

protected OpenListResourceBundle()
Sole constructor. (For invocation by subclass constructors, typically implicit.)

Method Detail

handleGetObject

public Object handleGetObject(String key)
Description copied from class: ResourceBundle
Override this method to provide the resource for a keys. This gets called by getObject. If you don't have a resource for the given key, you should return null instead throwing a MissingResourceException. You don't have to ask the parent, getObject() already does this; nor should you throw a MissingResourceException.

Specified by:
handleGetObject in class ResourceBundle
Parameters:
key - the key of the resource
Returns:
the resource for the key, or null if not in bundle

getKeys

public Enumeration<String> getKeys()
Implementation of ResourceBundle.getKeys.

Specified by:
getKeys in class ResourceBundle
Returns:
an enumeration of the keys

handleGetKeys

public Set<String> handleGetKeys()
Returns a set of keys provided in this resource bundle


getParent

public OpenListResourceBundle getParent()
Returns the parent bundle


getContents

protected abstract Object[][] getContents()
See ListResourceBundle class description.


createMap

protected Map createMap(int size)
Lets subclasses provide specialized Map implementations. Default uses HashMap.


aicas logo Jamaica 3.4 release 8

aicas GmbH, Karlsruhe - Germany    www.aicas.com
Copyright 2001-2009 aicas GmbH. All Rights Reserved.