Bug 500691 - [DI] ContextInjectionFactory should provide quick wrapper to create & tear down an object
Summary: [DI] ContextInjectionFactory should provide quick wrapper to create & tear do...
Status: NEW
Alias: None
Product: Platform
Classification: Eclipse Project
Component: Runtime (show other bugs)
Version: 4.7   Edit
Hardware: All All
: P3 enhancement (vote)
Target Milestone: ---   Edit
Assignee: platform-runtime-inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 500689
  Show dependency tree
 
Reported: 2016-09-01 12:29 EDT by Brian de Alwis CLA
Modified: 2017-11-15 13:51 EST (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Brian de Alwis CLA 2016-09-01 12:29:56 EDT
When interfacing with some code, it can be useful to quickly create and inject an object from a context, perform some action, and then uninject the object.  Sometime the uninjection step is forgotten.

We could create ContextInjectionFactory#with(Class<T>, Consumer<T>).  (I'm not wedded to the name "with".)