org.hibernate.validator.resourceloading
Class PlatformResourceBundleLocator

java.lang.Object
  extended by 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

Constructor Summary
PlatformResourceBundleLocator(String bundleName)
           
 
Method Summary
 ResourceBundle getResourceBundle(Locale locale)
          Search current thread classloader for the resource bundle.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PlatformResourceBundleLocator

public PlatformResourceBundleLocator(String bundleName)
Method Detail

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