Class Message

java.lang.Object
util.Message

public class Message extends Object
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 Details

    • sendMessage

      public static String sendMessage(String init, String function)
      Sends a formatted message for the given initial key and function, with no arguments.
      Parameters:
      init - the initial part of the message key
      function - the function or message type
      Returns:
      the formatted message string
    • sendMessage

      public static String sendMessage(String init, String function, Object... args)
      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 key
      function - the function or message type
      args - the arguments to format the message
      Returns:
      the formatted message string, or a colored error message if formatting fails