Jesse, This improvement has implemented, see for the main commit
http://github.com/pascallouisperez/guice-jit-providers/commit/2cae6f9db9b2b9d0ce1ec76cf9e50ffb83095701 Take a look at the updated test http://github.com/pascallouisperez/guice-jit-providers/blob/master/test/com/google/inject/JitProvidersTest.java just-in-time bindings are now much more natural bindJit(new TypeLiteral<Factory<?>>() {}) .toJitProvider(FactoryJitProvider.class) .in(Singleton.class); which would match Factory<Integer>, Factory<List<String>> and such. Variance is also supported: you could restricting the matching to bindJit(new TypeLiteral<Factory<? extends Serializable>>() {}) .toJitProvider(FactoryJitProvider.class) .in(Singleton.class); and only Serializable types could instantiate the wildcard. This logic is implemented in MoreTypes http://github.com/pascallouisperez/guice-jit-providers/blob/master/src/com/google/inject/internal/MoreTypes.java#L588 As you will see, there are some TODOs that I need to finish but I wanted to highlight the working feature to get feedback. Should I finish, clean up my client, and send you a patch? Best, PL On Jun 2, 5:35 pm, "[email protected]" <[email protected]> wrote: > On Jun 2, 7:41 am, Pascal-Louis <[email protected]> wrote: > > > Would that address your concerns? > > It would, but it still doesn't quite pay for its complexity. > Autobinders would let you replace something structurally simple but > verbose (a dozen or so repetitive bind() statements) with something > structurally complex but compact (some reflection to implement > JitProvider). -- You received this message because you are subscribed to the Google Groups "google-guice-dev" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/google-guice-dev?hl=en.
