Class Message
java.lang.Object
util.Message
Message provides utility methods for retrieving and formatting localized messages from a properties file.
It supports colored output using Jansi and handles missing format arguments gracefully.
-
Method Summary
Modifier and TypeMethodDescriptionstatic String
sendMessage
(String init, String function) Sends a formatted message for the given initial key and function, with no arguments.static String
sendMessage
(String init, String function, Object... args) Sends a formatted message for the given initial key, function, and arguments.
-
Method Details
-
sendMessage
-
sendMessage
Sends a formatted message for the given initial key, function, and arguments. Handles missing format arguments gracefully with a colored error message.- Parameters:
init
- the initial part of the message keyfunction
- the function or message typeargs
- the arguments to format the message- Returns:
- the formatted message string, or a colored error message if formatting fails
-