Class FrameworkMessages

java.lang.Object
com.ultikits.ultitools.text.internal.FrameworkMessages

@Internal public final class FrameworkMessages extends Object
Framework-owned message lookups for console logs and panel text.
  • Field Details

  • Constructor Details

    • FrameworkMessages

      private FrameworkMessages()
  • Method Details

    • messages

      public static Messages messages()
      Returns the framework's own Messages from the root container.
      Returns:
      the framework message service
      Throws:
      IllegalStateException - when the framework is not running
    • plain

      public static String plain(MessageKey key, Arg... args)
      Renders plain text in the server's fallback language without logging or throwing on unavailability. The renderer may log once for a missing key or an invalid argument format.
      Parameters:
      key - the framework message key
      args - named message arguments
      Returns:
      rendered text, or the key string when framework services or rendering are unavailable
    • overrideForTests

      public static AutoCloseable overrideForTests(Messages messages, Locale fallback)
      Replaces both lookups until the returned scope is closed; close scopes in reverse order.
      Parameters:
      messages - the test message service
      fallback - the test fallback locale
      Returns:
      a scope restoring both previous lookups
    • rootContext

      private static SimpleContainer rootContext()