cookxml.common.setter
Class ResourceBundleSetter
java.lang.Object
cookxml.common.setter.ResourceBundleSetter
- All Implemented Interfaces:
- Setter
- public class ResourceBundleSetter
- extends Object
- implements Setter
This setter sets the current resource bundle to be used. It also setups the StringHook
such that resources can be referenced within the XML document.
- Since:
- CookXml 1.0
- See Also:
ResourceBundleStringHook
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
SEPARATOR
public static String SEPARATOR
getInstance
public static Setter getInstance()
setAttribute
public void setAttribute(String tag,
String attr,
Object obj,
Object value,
DecodeEngine decodeEngine)
throws SetterException
- Description copied from interface:
Setter
- set the attribute of the object.
- Specified by:
setAttribute
in interface Setter
- Parameters:
tag
- the tag of the elementattr
- the name of the attributeobj
- the object associated with the elementvalue
- the value of the object. We didn't use the String type because it is
entirely possible for an object of the child elements to call the setter.decodeEngine
- the decodeengine that is being used.
- Throws:
SetterException
getResourceBundle
public static ResourceBundle getResourceBundle(String input)
- Get the resource bundle from the input, which consists of the resource bundle path and
the locale information, separated by the ";" character.
- Parameters:
input
- the resource location and locale for the resource bundle
- Returns:
- the ResourceBundle loaded.