org.hibernate.validator.resourceloading
Class PlatformResourceBundleLocator
java.lang.Object
org.hibernate.validator.resourceloading.PlatformResourceBundleLocator
- All Implemented Interfaces:
- ResourceBundleLocator
public class PlatformResourceBundleLocator
- extends Object
- implements ResourceBundleLocator
A resource bundle locator, that loads resource bundles by simply
invoking ResourceBundle.loadBundle(...)
.
- Author:
- Hardy Ferentschik, Gunnar Morling
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
PlatformResourceBundleLocator
public PlatformResourceBundleLocator(String bundleName)
getResourceBundle
public ResourceBundle getResourceBundle(Locale locale)
- Search current thread classloader for the resource bundle. If not found,
search validator (this) classloader.
- Specified by:
getResourceBundle
in interface ResourceBundleLocator
- Parameters:
locale
- The locale of the bundle to load.
- Returns:
- the resource bundle or
null
if none is found.
Copyright © 2007-2011 Red Hat Middleware, LLC. All Rights Reserved