Interface Resolver
- All Known Implementing Classes:
AtomicResolver
,CompositeResolver
,FieldResolver
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
Defines a contract for resolving values from a
MacroObjectMap
into a
set of string-replaceable entries mapped by MacroKey
s.
A Resolver
converts one or more input objects associated with a given
macro key into a MacroStringMap
, where each entry corresponds to a
placeholder that may be used in a templated message or text.
Implementations may vary in complexity:
AtomicResolver
handles single, directly formattable values.CompositeResolver
handles structured or composite values usingAdapter
s to produce multiple sub-entries.FieldResolver
combines multiple resolvers in a prioritized chain.
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionresolve
(MacroKey key, MacroObjectMap macroObjectMap) Resolves a set of string values from the givenMacroObjectMap
for the providedMacroKey
.
-
Method Details
-
resolve
Resolves a set of string values from the givenMacroObjectMap
for the providedMacroKey
. Each resolved value corresponds to a macro placeholder that may appear in a templated message.The resulting
MacroStringMap
may contain one or more entries. Implementations may also return an empty map if no resolution was possible.- Parameters:
key
- the base macro key used to look up and resolve objectsmacroObjectMap
- the map of objects available for macro resolution- Returns:
- a
MacroStringMap
containing resolved macro key-value pairs
-