Package com.winterhavenmc.library.messagebuilder.pipeline.extractor


package com.winterhavenmc.library.messagebuilder.pipeline.extractor
Provides mechanisms for extracting macro-compatible string values from objects that have been adapted by the Adapter system.

This package is responsible for converting functional adapter interfaces (such as Nameable, Locatable, Quantifiable, etc.) into a structured MacroStringMap. The keys and values produced are used to populate and resolve placeholder macros in messages built by the MessageBuilderLib pipeline.

The Extractor interface defines the contract for this behavior, and the FieldExtractor class provides the default implementation, dispatching to the appropriate extractor methods based on the runtime type of both the adapter and the adapted object.

Usage Example

Once an object has been adapted to a supported interface (e.g., Nameable), the extractor will automatically invoke the correct method to produce all relevant placeholder mappings (e.g., {ENTITY.NAME}).

This layer ensures consistent population and resolution of macros across the library.

  • Class
    Description
    Functional interface representing a strategy for extracting macro-replaceable fields from an object that has been successfully adapted by a given Adapter.
    Default implementation of the Extractor interface that delegates field extraction to the appropriate functional interface based on the adapter type.