Details
-
Clarification
-
Resolution: Done
-
Major
-
None
-
None
-
None
Description
Right now, there are four methods to create/producer bean instance and two methods to destroy/dispose bean instance:
- createWith(Function<CreationalContext<U>, U> callback)
- <U extends T> BeanConfigurator<U> produceWith(Supplier<U> callback)
- <U extends T> BeanConfigurator<U> produceWith(Function<Instance<Object>, U> callback)
- <U extends T> BeanConfigurator<U> producing(U instance)
- destroyWith(BiConsumer<T, CreationalContext<T>> callback)
- disposeWith(Consumer<T> callback)
I think we should:
- remove producing() and produceWith(Supplier<U> callback) methods
- clarify that Instance<Object> is used to "simulate" producer method injection points and behaves in the same way
- modify disposeWith(Consumer<T> callback) to disposeWith(BiConsumer<T, Instance<Object>> callback) so that it's possible to "simulate" disposer method injection points