Nevermind, I was totally confused on what ContextResolver was. From
reading things closer, you can only inject ContextResolver instances.
Still...I don't like this class or its use. Seems very half-baked to me.
Bill Burke wrote:
> The "type" parameter to getContext() seems redundant, am I missing
> something?
>
> public interface ContextResolver<T>
> {
> T getContext(Class<?> type);
> }
>
> For this example:
>
> @Context CustomInjectedType custom;
>
> @Provider
> public class MyCustom implements ContextResolver<CustomInjectedType> {}
>
>
> Isn't <T> enough information for the JAX-RS runtime to resolve what to
> inject? All the runtime has to do is do
> providerClass.getGenericInterfaces() and see what is a ContextResolver
> and pull the type form that.
>
> Or, am I missing what ContextResolver is supposed to do?
>
> Thanks
>
>
>
>
>
>
>
--
Bill Burke
JBoss, a division of Red Hat
http://bill.burkecentral.com