My favorites | Sign in
Google
                
Search
for
Updated Nov 07, 2009 by limpbizkit
UntargettedBindings  
Creating bindings that don't have targets

Untargetted Bindings

You may create bindings without specifying a target. This is most useful for concrete classes and types annotated by either @ImplementedBy or @ProvidedBy. An untargetted binding informs the injector about a type, so it may prepare dependencies eagerly. Untargetted bindings have no to clause, like so:

    bind(MyConcreteClass.class);
    bind(AnotherConcreteClass.class).in(Singleton.class);

Sign in to add a comment