Name: krC82822 Date: 01/10/2001
orig synopsis: "Provide factory semantics for ResourceBundle"
Classic VM (build JDK-1.2.2_006, native threads, symcjit)
I am developing a ResourceBundle subclass that uses an XML document to store
properties. The intent is to be able to manage resources with files that
end with ".xml" and retrieve them via a mechanism similar to how
PropertyResourceBundle instances are created from ".properties" files.
The only way that this is possible with the current ResourceBundle implementation
is to provide a ClassLoader to the getBundle() method which implements the lookup
mechanism. However, this creates complications for use of the mechanism in
I propose a ResourceBundleFactory interface with a
getBundle() method that returns a ResourceBundle. An additional getBundle() method
in ResourceBundle would take a ResourceBundleFactory instance paramenter, plus
the baseName and locale parameters. The factory implementation could determine
how/whether to address ClassLoader requirements. Bug reports 4303146 and
4175293 are related.
(Review ID: 114586)