|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjava.util.ResourceBundle
org.norther.tammi.core.locale.LookupResourceBundle
public class LookupResourceBundle
An extension of java.util.ResourceBundle implementing a lookup
method, which returns null for a missing resource instead of throwing an
exception.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class java.util.ResourceBundle |
|---|
ResourceBundle.Control |
| Field Summary |
|---|
| Fields inherited from class java.util.ResourceBundle |
|---|
parent |
| Constructor Summary | |
|---|---|
protected |
LookupResourceBundle()
Constructs an empty bundle. |
|
LookupResourceBundle(ResourceBundle bundle)
Constructs a new bundle with an adapter. |
protected |
LookupResourceBundle(String name)
Constructs a named bundle. |
|
LookupResourceBundle(String name,
ResourceBundle bundle)
Constructs a named bundle with an adapter. |
| Method Summary | |
|---|---|
String |
getBaseName()
Gets the base name of this bundle. |
Enumeration<String> |
getKeys()
Implementation of the ResourceBundle.getKeys method. |
protected Enumeration<String> |
getKeys(Set<String> keys)
Gets local and parent keys. |
protected ResourceBundle |
getParent()
Gets the parent. |
protected Object |
handleGetObject(String key)
Implementation of the ResourceBundle.handleGetObject method. |
Object |
lookup(String key)
Looks up for a resource. |
Object |
lookup(String key,
Locale locale)
Looks up for a resource for an exact locale. |
String |
lookupKey(Object resource)
Looks up for a resource key. |
Object |
lookupObject(String key)
Looks up for an object resource. |
String |
lookupString(String key)
Looks up for a string resource. |
String[] |
lookupStringArray(String key)
Looks up for a string array resource. |
protected void |
setBaseName(String name)
Sets the base name. |
| Methods inherited from class java.util.ResourceBundle |
|---|
clearCache, clearCache, containsKey, getBundle, getBundle, getBundle, getBundle, getBundle, getBundle, getLocale, getObject, getString, getStringArray, handleKeySet, keySet, setParent |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public LookupResourceBundle(ResourceBundle bundle)
bundle - the adapter.
public LookupResourceBundle(String name,
ResourceBundle bundle)
name - the base name of this bundle.bundle - the adapter.protected LookupResourceBundle()
protected LookupResourceBundle(String name)
name - the base name of this bundle.| Method Detail |
|---|
public String getBaseName()
public Object lookup(String key,
Locale locale)
key - the resource key.locale - the locale.
public Object lookup(String key)
key - the resource key.
public Object lookupObject(String key)
key - the resource key.
public String lookupString(String key)
key - the resource key.
public String[] lookupStringArray(String key)
key - the resource key.
public String lookupKey(Object resource)
resource - the resource.
public Enumeration<String> getKeys()
getKeys in class ResourceBundleprotected Object handleGetObject(String key)
handleGetObject in class ResourceBundlekey - the key of the object to get.
protected Enumeration<String> getKeys(Set<String> keys)
keys - a set of local keys.
protected ResourceBundle getParent()
protected void setBaseName(String name)
name - the base name.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||