Package org.apache.juneau.bct.assertions
Class Messages
java.lang.Object
org.apache.juneau.bct.assertions.Messages
A lightweight message-bundle loader for the assertions classes.
Self-contained replacement for the marshall Messages loader, built on commons
ResourceBundleUtils. Supports only the single pattern used by the
assertion classes: Messages.of(SomeAssertion.class, "Messages").getString(shortKey).
-
Method Summary
-
Method Details
-
of
Creates a message bundle for the specified class.- Parameters:
forClass- The class the bundle belongs to. Must not benull .name- The bundle name (e.g."Messages" ). Must not benull .- Returns:
- A new message bundle. Never
null .
-
getString
Returns the value for the specified key.Resolves
<SimpleClassName>.<key> first, then the barekey .- Parameters:
key- The short message key.- Returns:
- The resolved value, or
"{!key}" if not found.
-