ResourceBundle with 2 new capabilities. The first is to store the path where the properties file used to create the
InputStream is located and the second is to allow additional ResourceBundle properties to be merged into an instance.
SystemOfUnits to locate and merge extension module properties files.
| Modifier and Type | Field and Description |
|---|---|
| private final StringBuilder | mergedBundlePaths
A |
| private String | resourcePath
The location of the properties file that was used to instantiate the |
| private final Map | resources
A |
| Access | Constructor and Description |
|---|---|
| public | MultiPropertyResourceBundle(InputStream
The stream, String InputStream passed on to the super class constructor.The location of the properties file used to create the resourcePath)InputStreamInstantiates a new |
| public | MultiPropertyResourceBundle(ResourceBundle baseBundle, String resourcePath)
Constructor for instantiating from an existing |
| Modifier and Type | Method and Description |
|---|---|
| public boolean | Returns: true if the key is present and false otherwise.the resource key)keyOverrides java. Overrides the super class implementation to check the existence of a key across all merged bundles |
| public Enumeration | Returns: AnEnumeration of the keys across all the merged bundles.Implements abstract java. Overrides the super class implementation to return an enumeration of keys from all the merged bundles |
| public StringBuilder | Returns: Returns theStringBuilder instance containing the paths of all the ResourceBundle instances that have been merged into
this instance.
|
| public String | Returns: The location of the properties file that was used to instantiate theMultiPropertyResourceBundle instance.
|
| public Object | Returns: AnObject from the merged bundlesthe key for the desired object key)Implements abstract java. Overrides the super class implementation to return an object located in the merged bundles |
| protected Set | Returns: ASet of keys obtained from all merged bundlesOverrides java. Overrides the super class implementation to return the |
| public Set | Returns: ASet of keys obtained from all merged bundlesOverrides java. Overrides the super class implementation to return the |
| public void | merge(ResourceBundle
The resourceBundle, String aResourcePath)ResourceBundle to merge the properties of.Merges the properties of a |
| mergedBundlePaths | back to summary |
|---|---|
| private final StringBuilder mergedBundlePaths A | |
| resourcePath | back to summary |
|---|---|
| private String resourcePath The location of the properties file that was used to instantiate the | |
| resources | back to summary |
|---|---|
| private final Map<String, Object> resources A | |
| MultiPropertyResourceBundle | back to summary |
|---|---|
| public MultiPropertyResourceBundle(InputStream stream, String resourcePath) throws IOException Instantiates a new
| |
| MultiPropertyResourceBundle | back to summary |
|---|---|
| public MultiPropertyResourceBundle(ResourceBundle baseBundle, String resourcePath) Constructor for instantiating from an existing | |
| containsKey | back to summary |
|---|---|
| public boolean containsKey(String key) Overrides java. Overrides the super class implementation to check the existence of a key across all merged bundles
| |
| getKeys | back to summary |
|---|---|
| public Enumeration Implements abstract java. Overrides the super class implementation to return an enumeration of keys from all the merged bundles
| |
| getMergedBundlePaths | back to summary |
|---|---|
public StringBuilder getMergedBundlePaths()
| |
| getResourcePath | back to summary |
|---|---|
public String getResourcePath()
| |
| handleGetObject | back to summary |
|---|---|
| public Object handleGetObject(String key) Implements abstract java. Overrides the super class implementation to return an object located in the merged bundles
| |
| handleKeySet | back to summary |
|---|---|
| protected Set Overrides java. Overrides the super class implementation to return the | |
| keySet | back to summary |
|---|---|
| public Set Overrides java. Overrides the super class implementation to return the | |
| merge | back to summary |
|---|---|
| public void merge(ResourceBundle resourceBundle, String aResourcePath) Merges the properties of a
| |