- Enclosing class:
Resources
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
Listeners may be registered to be notified as messages are looked-up.
This is a hook used for in-context translation tools.
-
Method Summary
Modifier and TypeMethodDescriptionvoid
onGetMessage
(Resources resources, Locale locale, String key, Object[] args, String resource, String result) Called duringResources.getMessage(java.util.Locale, java.lang.String, java.lang.Object...)
when a lookup is performed and the key found.
-
Method Details
-
onGetMessage
void onGetMessage(Resources resources, Locale locale, String key, Object[] args, String resource, String result) Called duringResources.getMessage(java.util.Locale, java.lang.String, java.lang.Object...)
when a lookup is performed and the key found.- Parameters:
args
- The set of arguments, may be an empty array, nevernull
.resource
- The value received from theResourceBundle
ornull
when the lookup failed.result
- The result, possibly including any message substitutions. This will always be a unique String instance per call, allowing listeners to match individual strings to their lookup by identity.
-