Sam, I would very much like to see just-in-time providers in Guice 3.0 http://groups.google.com/group/google-guice-dev/browse_thread/thread/30f5acafb96744ae
The feature is close to production quality and I can guarantee bandwidth to complete it. PL On Jun 28, 5:27 pm, Sam Berlin <[email protected]> wrote: > All, > > The Guice SVN trunk is significantly improved since the Guice 2.0 release. > It incorporates support for JSR 330, it solves various OSGi issues, it has > a ton of bug fixes, and the extensions (AssistedInjection, Multibinder, > Servlet, etc..) are all improved. I propose that we release the next > version of Guice as 3.0, primarily because of the JSR 330 support. "2.1" > wouldn't quite capture that monumental achievement. (I actually kind of > want to name it Guice 3.30, to highlight JSR 330 support, ha!) > > I'll be glad to do what's needed to get Guice ready for a release (add > proper @since tags, cleanup javadocs, wiki, etc..). > > Please take some time to look through the changes below. I believe that > Guice SVN is ready as-is for a 3.0 release, but if you are all able to > glance at any open issues and point out major ones that can be solved, it > would be appreciated. It would be amazing if we were able to do this by > JavaOne. > > There's been approximately 200 commits to SVN since 2.0, so listing all > bugfixes isn't possible, but below is a list of large/logical changes (in > order of reading the SVN commit history)... > - Added support for toConstructor bindings. > - Consider toInstance bindings 'eager singletons' for scoping SPI purposes. > - Many, many servlet extension fixes. > - Added Multimap support to the multibinder extension. > - Added ability to multibinder to permit duplicates. > - Added a scope checker utility. > - Updated AssistedInject to use FactoryModuleBuilder, actually faster > performance-wise than way old implementation. > - Added JSR 330 support. > - Properly handle overridden @Inject methods (both with & without subclass > annotating @Inject). > - Fix circularly dependent singletons so that two singletons aren't created > sometimes. > - Add with(instance) API for servlet bindings. > - Add ability to make @Inject methods as @Toolable, so they are called > during Stage.TOOL (for extensions). > - Add InjectorBuilder, and ability to forcibly disable JIT bindings and > circular proxies. > - Update Multibinder so dependencies can be retrieved in Stage.TOOL. > - Allow duplicate bindings to be silently ignored (instead of blowing up). > - Fix combination of Multibinder & Modules.override(). > - Proper OSGi support. > - Fixed Provider methods that request a Logger so named loggers are used > instead of anonymous loggers. > - Fixed to remove residue JIT bindings left in the parent injector when > child injectors fail creating JIT bindings sometimes. > - Fixed multibinder to work properly when based on marker (parameterless) > annotations. > > Below is a list of API changes for core guice (not extensions) currently in > trunk since the 2.0 release, found using the jdiff tool, excluding the > 'internal' package: > > com.google.inject - > added: InjectorBuilder class > deprecated: Guice.createInjector(Stage, Module{}) > deprecated: Guice.createInjector(Stage, Iterable<Module>) > added: Injector.getAllBindings > added: Injector.getExistingBinding(Key<T>) > added: Injector.getScopeBindings() > added: Key.hasAttributes > added: Key.ofType(Type) > added: Key.ofType(TypeLiteral<T>) > added: Key.ofType(Class<T>) > added: Key.withoutAttributes() > modified: Provider [extends javax.inject.Provider] > added: Scopes.isSingleton(Binding<?>) > > com.google.inject.binder - > added: LinkedBindingBuilder.toConstructor(Constructor<S>) > added: LinkedBindingBuilder.toConstructor(Constructor<S>, TypeLiteral<? > extends S>) > modified: LinkedBindingBuilder.toProvider(Key<Provider ? extends T>>) > [using javax.inject.Provider now] > modified: LinkedBindingBuilder.toProvider(TypeLiteral<Provider ? extends > T>>) [using javax.inject.Provider now] > modified: LinkedBindingBuilder.toProvider(Class<Provider ? extends T>>) > [using javax.inject.Provider now] > > com.google.inject.tools > added: Toolable annotation > changed: DefaultElementVisitor.visit(InjectionRequest<?>) [added <?> to > parameter] > changed: ElementVisitor.visit(InjectionRequest<?>) [added <?> to > parameter] > added: InjectionPoint.forConstructor(Constructor<T>) > added: InjectionPoint.forConstructor(Constructor<T>, TypeLiteral<? extends > T>) > added: InjectionPoint.getDeclaringType() > added: InjectionPoint.isToolable() > changed: InjectionPoint.forStaticMethodsAndFields(TypeLiteral<?>) [added > <?> to parameter] > changed: ProviderKeyBinding.getProviderKey() [return type is now > Key<Provider? extends T>>, where Provider is now javax.inject.Provider] > > com.google.inject.util > added: Jsr330 class > added: ScopeChecker class > > Sam -- 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.
