public class PlatformResourceBundleLocator extends Object implements ResourceBundleLocator
ResourceBundle.loadBundle(String, Local, ClassLoader).
This locator is also able to load all property files of a given name (in case there are multiple with the same
name on the classpath) and aggregates them into a ResourceBundle.
| Constructor and Description |
|---|
PlatformResourceBundleLocator(String bundleName) |
PlatformResourceBundleLocator(String bundleName,
ClassLoader classLoader)
Creates a new
PlatformResourceBundleLocator. |
PlatformResourceBundleLocator(String bundleName,
ClassLoader classLoader,
boolean aggregate)
Creates a new
PlatformResourceBundleLocator. |
| Modifier and Type | Method and Description |
|---|---|
ResourceBundle |
getResourceBundle(Locale locale)
Search current thread classloader for the resource bundle.
|
public PlatformResourceBundleLocator(String bundleName)
public PlatformResourceBundleLocator(String bundleName, ClassLoader classLoader)
PlatformResourceBundleLocator.bundleName - the name of the bundle to loadclassLoader - the classloader to be used for loading the bundle. If null, the current thread context
classloader and finally Hibernate Validator's own classloader will be used for loading the specified
bundle.public PlatformResourceBundleLocator(String bundleName, ClassLoader classLoader, boolean aggregate)
PlatformResourceBundleLocator.bundleName - the name of the bundle to loadclassLoader - the classloader to be used for loading the bundle. If null, the current thread context
classloader and finally Hibernate Validator's own classloader will be used for loading the specified
bundle.aggregate - Whether or not all resource bundles of a given name should be loaded and potentially merged.public ResourceBundle getResourceBundle(Locale locale)
getResourceBundle in interface ResourceBundleLocatorlocale - The locale of the bundle to load.null if none is found.Copyright © 2018 JBoss by Red Hat. All rights reserved.