public class ApplicationResourceBundle
extends java.lang.Object
Contains an application level resource bundle name and its associated descriptions, if any.
Modifier and Type | Field and Description |
---|---|
private java.lang.String |
baseName |
static java.lang.String |
DEFAULT_KEY |
private java.util.Map<java.lang.String,java.lang.String> |
descriptions |
private java.util.Map<java.lang.String,java.lang.String> |
displayNames |
private java.util.Map<java.util.Locale,java.util.ResourceBundle> |
resources |
Constructor and Description |
---|
ApplicationResourceBundle(java.lang.String baseName,
java.util.Map<java.lang.String,java.lang.String> displayNames,
java.util.Map<java.lang.String,java.lang.String> descriptions)
Constructs a new ApplicationResourceBundle
|
Modifier and Type | Method and Description |
---|---|
java.lang.String |
getBaseName() |
java.lang.String |
getDescription(java.util.Locale locale) |
java.lang.String |
getDisplayName(java.util.Locale locale) |
java.util.ResourceBundle |
getResourceBundle(java.util.Locale locale) |
private java.lang.String |
queryMap(java.util.Locale locale,
java.util.Map<java.lang.String,java.lang.String> map)
Lookup and return the text for the specified
Locale
from within the specified Map . |
public static final java.lang.String DEFAULT_KEY
private final java.lang.String baseName
private final java.util.Map<java.lang.String,java.lang.String> displayNames
private final java.util.Map<java.lang.String,java.lang.String> descriptions
private volatile java.util.Map<java.util.Locale,java.util.ResourceBundle> resources
public ApplicationResourceBundle(java.lang.String baseName, java.util.Map<java.lang.String,java.lang.String> displayNames, java.util.Map<java.lang.String,java.lang.String> descriptions)
Constructs a new ApplicationResourceBundle
baseName
- the base name of the ResourceBundle
displayNames
- any display names that were associated
with the resource bundle definition in the configuration resourcedescriptions
- any descriptions that were associated
with the resource bundle definition in the configuration resourcepublic java.lang.String getBaseName()
ResourceBundle
associated with
this ApplicationResourceBundle
instancepublic java.util.ResourceBundle getResourceBundle(java.util.Locale locale)
locale
- a Locale
ResourceBundle
associated with the
specified localepublic java.lang.String getDisplayName(java.util.Locale locale)
locale
- a Locale
display-name
element associated with the
specified localepublic java.lang.String getDescription(java.util.Locale locale)
locale
- a Locale
description
element associated with the
specified localeprivate java.lang.String queryMap(java.util.Locale locale, java.util.Map<java.lang.String,java.lang.String> map)
Lookup and return the text for the specified Locale
from within the specified Map
.
locale
- Locale
if interestmap
- a map containing localized text keyed by Locale
Copyright © 2002-2013 Oracle America, Inc. All Rights Reserved.