Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [e4-dev] E4 Formal API Part 2: UI Model

On 7-Mar-2013, at 1:54 PM, Wim Jongman wrote:
If the adapter framework is active in this scenario then it would save even more boilerplate code.

       @Inject
       public void someMethod(@Optional @Adapt @Named(IServiceConstants.Active_Selection)  Person person)

Great minds think alike :-)  I said something to that effect on the E4 IRC last night:

[00:41:37] <bsd> It would be cool if the DI injector could use the Adapter/IAdapterManager to do type coercion

It's totally doable as an @Adapt + ExtendedObjectSupplier.  And since the IRequestor provides the typing details of the request location, we could even do Array <—> Collection remaps and more.

Bug 398728 might present a problem here, if the adapted-to type is already in the context.

Brian.


Back to the top