All Known Implementing Classes:
PlaceholderMatcher
Functional Interface:
This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.

@FunctionalInterface public interface Matcher
A functional interface representing a strategy for extracting MacroKey instances from an input string using a specified regular expression pattern.

This interface abstracts the placeholder matching logic used throughout the message processing pipeline, allowing different implementations or syntaxes if desired.

Typically used to:

  • Find base macro keys that indicate which objects should be resolved
  • Locate full placeholder keys to be substituted during rendering

Implementations must return a stream of distinct MacroKey instances derived from all matches found in the input string.

See Also:
  • Method Summary

    Modifier and Type
    Method
    Description
    match(String input, Pattern pattern)
    Extracts macro keys from the given input string using the specified regular expression pattern.
  • Method Details

    • match

      Stream<MacroKey> match(String input, Pattern pattern)
      Extracts macro keys from the given input string using the specified regular expression pattern.

      Each successful match is converted into a MacroKey. Implementations may choose to skip invalid or malformed macro segments.

      Parameters:
      input - the raw string to search for macros (e.g., a message from the YAML file)
      pattern - the regular expression pattern used to locate macro placeholders
      Returns:
      a stream of matched MacroKey instances (may be empty but never null)