Ok, this would solve the throw if adaption is not possible case, what about
the validation use case?

Carsten


2014-07-01 12:50 GMT+02:00 Bertrand Delacretaz <[email protected]>:

> On Tue, Jul 1, 2014 at 12:38 PM, Stefan Egli <[email protected]>
> wrote:
> > I like the idea too, but I guess it's merely a question of taste as to
> > which of the following two options is nicer:
> >  * Foo f = someObject.adaptTo(RequireAdapter<Foo>.class));
> >  * Foo f = someObject.adaptToUnchecked(Foo.class);
>
> The big difference is that the first variant requires no API changes
> and only requires code changes in AdapterManagerImpl (I think -
> haven't looked in full detail ;-)
>
> -Bertrand
>



-- 
Carsten Ziegeler
Adobe Research Switzerland
[email protected]

Reply via email to