Interface Extractor
- 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.
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 TypeMethodDescription<T> MacroStringMap
Extracts a set of macro string values from an adapted object and returns a map of placeholder keys to replacement strings.
-
Method Details
-
extract
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 baseMacroKey
representing the placeholder prefixadapter
- the adapter used to produce the adapted objectadapted
- the result of adapting an object to a known macro field interface- Returns:
- a
MacroStringMap
containing all extracted macro values
-