Top Description Fields Constructors Methods
org.hibernate.validator.resourceloading

pack-priv Class AggregateResourceBundle

extends ResourceBundle
Class Inheritance
Known Direct Subclasses
org.hibernate.validator.resourceloading.AggregateResourceBundleLocator.AggregateBundle
Static Imports
org.hibernate.validator.internal.util.CollectionHelper.newHashSet

A ResourceBundle whose content is aggregated from multiple source bundles.
Authors
Gunnar Morling, Guillaume Smet

Field Summary

Modifier and TypeField and Description
private final Map<String, Object>
Inherited from java.util.ResourceBundle:
parent

Constructor Summary

AccessConstructor and Description
pack-priv

Method Summary

Modifier and TypeMethod and Description
public Enumeration<String>
getKeys()

Implements abstract java.util.ResourceBundle.getKeys.

Returns an enumeration of the keys.
protected Object
handleGetObject(String
the key for the desired object
key
)

Implements abstract java.util.ResourceBundle.handleGetObject.

Gets an object for the given key from this resource bundle.
protected Set<String>
handleKeySet()

Overrides java.util.ResourceBundle.handleKeySet.

Returns a Set of the keys contained only in this ResourceBundle.
Inherited from java.util.ResourceBundle:
clearCacheclearCachecontainsKeygetBaseBundleNamegetBundlegetBundlegetBundlegetBundlegetBundlegetBundlegetBundlegetBundlegetLocalegetObjectgetStringgetStringArraykeySetsetParent

Field Detail

contentsback to summary
private final Map<String, Object> contents
Annotations
@Immutable

Constructor Detail

AggregateResourceBundleback to summary
pack-priv AggregateResourceBundle(List<ResourceBundle> bundles)

Method Detail

getKeysback to summary
public Enumeration<String> getKeys()

Implements abstract java.util.ResourceBundle.getKeys.

Doc from java.util.ResourceBundle.getKeys.

Returns an enumeration of the keys.

Returns:Enumeration<String>

an Enumeration of the keys contained in this ResourceBundle and its parent bundles.

Annotations
@Override
handleGetObjectback to summary
protected Object handleGetObject(String key)

Implements abstract java.util.ResourceBundle.handleGetObject.

Doc from java.util.ResourceBundle.handleGetObject.

Gets an object for the given key from this resource bundle. Returns null if this resource bundle does not contain an object for the given key.

Parameters
key:String

the key for the desired object

Returns:Object

the object for the given key, or null

Annotations
@Override
handleKeySetback to summary
protected Set<String> handleKeySet()

Overrides java.util.ResourceBundle.handleKeySet.

Doc from java.util.ResourceBundle.handleKeySet.

Returns a Set of the keys contained only in this ResourceBundle.

The default implementation returns a Set of the keys returned by the getKeys method except for the ones for which the handleGetObject method returns null. Once the Set has been created, the value is kept in this ResourceBundle in order to avoid producing the same Set in subsequent calls. Subclasses can override this method for faster handling.

Returns:Set<String>

a Set of the keys contained only in this ResourceBundle

Annotations
@Override