-
- 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.
@FunctionalInterface public static interface Resources.Listener
Listeners may be registered to be notified as messages are looked-up. This is a hook used for in-context translation tools.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidonGetMessage(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 Detail
-
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:
resource- The value received from theResourceBundleornullwhen the lookup failed.args- The set of arguments, may be an empty array, nevernull.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.
-
-