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

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `PlatformResourceBundleLocator(String bundleName)`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `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-2014 Red Hat, Inc. All Rights Reserved