Feature - non-recursive factories
Description
Add a new addFactory signature:
public <T> void addFactory(Class<T> type, Supplier<T> factory);
Rationale
Using a Supplier instead of a custom Factory interface allows for method references to be used. This also means that default constructors can be passed using a new reference, which is useful for overrides.
Checklist
-
addFactory(Class<T> type, Supplier<T> factory);