public interface MessageBundle
An overridable resource bundle.
Unlike standard ResourceBundle
, missing resource keys do not throw exceptions.
Instead, missing keys return a formatted fallback string in the format "!missing_key!"
to make missing resources obvious while preventing application crashes.
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionstatic MessageBundle
messageBundle
(Class<?> resourceOwner, ResourceBundle bundle)
-
Method Details
-
getString
- Parameters:
key
- the key- Returns:
- the string associated with the given key, or
"!key!"
if the key is not found
-
messageBundle
- Parameters:
resourceOwner
- the resource ownerbundle
- the resource bundle to override- Returns:
- a new
MessageBundle
instance
-