com.bluemarsh.jswat.action
Class Bundle
java.lang.Object
|
+--com.bluemarsh.jswat.action.Bundle
- public class Bundle
- extends java.lang.Object
Class Bundle contains a java.util.ResourceBundle
and
provides some simple access methods to it. The idea is that this
class exists in each package that requires resources. This class
contains the resources defined in the Bundle.properties file within
this package. Only the classes in this package will use this particular
class. Identical Bundle classes will exist in all of the packages in
which resources are needed.
Granted, this implies that the class is reproduced verbatim from
one package to the next, but it is very fast and efficient.
- Author:
- Nathan Fiedler
Method Summary |
static java.util.ResourceBundle |
getBundle()
Retrieves the resource bundle for this package. |
static java.net.URL |
getResource(java.lang.String key)
Retrieves an object from the localized resource bundle. |
static java.lang.String |
getString(java.lang.String key)
Retrieves the String resource from this bundle. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Bundle
public Bundle()
getBundle
public static java.util.ResourceBundle getBundle()
- Retrieves the resource bundle for this package. Provided in the
event the caller wants direct access to the resource bundle.
- Returns:
- resource bundle for this package.
getResource
public static java.net.URL getResource(java.lang.String key)
- Retrieves an object from the localized resource bundle.
In most cases this is an image.
- Parameters:
key
- key name of the resource to find.- Returns:
- URL pointing to the object resource.
getString
public static java.lang.String getString(java.lang.String key)
- Retrieves the String resource from this bundle.
- Parameters:
key
- name of String resource to retrieve.- Returns:
- resource bundle for this package.