All Known Implementing Classes:
MacroReplacer

public interface Replacer
A functional interface representing a macro replacement engine that substitutes placeholder values within a message string using data from a MacroObjectMap.

This interface abstracts the final stage in the message-building pipeline, where macros (e.g., %PLAYER_NAME%, %LOCATION_X%) are resolved to actual string values prior to display.

Implementations must ensure that all macros present in the input string are replaced using context objects available in the provided MacroObjectMap.

See Also:
  • Method Summary

    Modifier and Type
    Method
    Description
    replace(MacroObjectMap macroObjectMap, String messageString)
    Replaces all macro placeholders in the provided message string using values from the given macro object map.
  • Method Details

    • replace

      String replace(MacroObjectMap macroObjectMap, String messageString)
      Replaces all macro placeholders in the provided message string using values from the given macro object map.
      Parameters:
      macroObjectMap - a map of macro keys to context objects
      messageString - the input message string containing one or more macros
      Returns:
      the fully formatted string with all resolvable macros replaced