• Post Reply Bookmark Topic Watch Topic
  • New Topic

ResourceBundle with alternative constructors  RSS feed

Greg Akins
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm looking for a way to load a parameterized ResourceBundle at runtime.. does anyone have any suggestions?

I have inherited some legacy code which includes a DbResourceBundle that has some additional constructors that include parameters so that only appropriate values will be loaded from the database.

For example

In one case I avoided the parameterized constructor by creating individual classes with consturctors like like

However, the more I look at the expectations around extending ResourceBundles it appears that the extra constructor parameters are an anti-pattern.

Any thoughts?
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!