Package org.jfree.report.i18n

# Class DefaultResourceBundleFactory

java.lang.Object
org.jfree.report.i18n.DefaultResourceBundleFactory

All Implemented Interfaces:
  `Serializable`, `ResourceBundleFactory`

public class DefaultResourceBundleFactory extends Object implements ResourceBundleFactory
A default implementation of the ResourceBundleFactory, that creates resource bundles using the specified locale.

If not defined otherwise, this implementation uses `Locale.getDefault()` as Locale.

Author:
  Thomas Morgner
See Also:
  - Serialized Form

## Field Summary

### Fields inherited from interface org.jfree.report.i18n.ResourceBundleFactory

`DEFAULT_RESOURCE_BUNDLE_CONFIG_KEY`

## Constructor Summary

Constructors
Constructor
Description
`DefaultResourceBundleFactory()`
Creates a new DefaultResourceBundleFactory using the system's default locale as factory locale.

## Method Summary

Modifier and Type
Method
Description
`ResourceBundle`
`getResourceBundle(Locale locale, String key)`
Creates a resource bundle named by the given key and using the factory's defined locale.

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

## Constructor Details

### DefaultResourceBundleFactory

public DefaultResourceBundleFactory()
Creates a new DefaultResourceBundleFactory using the system's default locale as factory locale.

## Method Details

### getResourceBundle

public ResourceBundle getResourceBundle(Locale locale, String key)
Creates a resource bundle named by the given key and using the factory's defined locale.

Specified by:
  `getResourceBundle` in interface `ResourceBundleFactory`
Parameters:
  `key` - the name of the resourcebundle, never null.
Returns:
  the created resource bundle
Throws:
  `NullPointerException` - if `key` is `null`
  `MissingResourceException` - if no resource bundle for the specified base name can be found
See Also:
  - `ResourceBundle.getBundle(String,Locale)`