All Known Implementing Classes:
FieldExtractor
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 Extractor
Functional interface representing a strategy for extracting macro-replaceable fields from an object that has been successfully adapted by a given Adapter.

The extractor maps the values returned by the adapted object into a MacroStringMap, keyed by the appropriate macro placeholder keys derived from the MacroKey base.

Each Adapter is responsible for adapting a specific object type to a known functional interface (e.g., Nameable, Locatable, Ownable, etc.). The Extractor then calls the appropriate extraction method for that interface, using the provided base macro key and context.

  • Method Summary

    Modifier and Type
    Method
    Description
    extract(MacroKey baseKey, Adapter adapter, T adapted)
    Extracts a set of macro string values from an adapted object and returns a map of placeholder keys to replacement strings.
  • Method Details

    • extract

      <T> MacroStringMap extract(MacroKey baseKey, Adapter adapter, T adapted)
      Extracts a set of macro string values from an adapted object and returns a map of placeholder keys to replacement strings.
      Type Parameters:
      T - the type of the adapted object
      Parameters:
      baseKey - the base MacroKey representing the placeholder prefix
      adapter - the adapter used to produce the adapted object
      adapted - the result of adapting an object to a known macro field interface
      Returns:
      a MacroStringMap containing all extracted macro values