To be able to add custom placeholders from outside of the
generator, infrastructure allowing this should be created
(#10 ).
In this MR, the current implementation approach is discussed.\
The way this works is by having a registry where custom
placeholder resolvers (of type PlaceholderType.Custom) can
be registered.\
When the resolver is passed a placeholder to resolve, the
resolver now consults the registry on whether it has a
resolver for the placeholder registered, and if it does it \
accesses it a second time to retrieve an Optional of the
corresponding class.\
The registry is passed to the resolver on first creation, and
subsequently gets passed to the recursive instantiations.
Add custom placeholder infrastructure
To be able to add custom placeholders from outside of the generator, infrastructure allowing this should be created (#10 ).
In this MR, the current implementation approach is discussed.\ The way this works is by having a registry where custom placeholder resolvers (of type
PlaceholderType.Custom
) can be registered.\ When the resolver is passed a placeholder to resolve, the resolver now consults the registry on whether it has a resolver for the placeholder registered, and if it does it \ accesses it a second time to retrieve anOptional
of the corresponding class.\ The registry is passed to the resolver on first creation, and subsequently gets passed to the recursive instantiations.