org.beanlet
Interface Provider<T>


public interface Provider<T>

Provides instances of T. Typically implemented by an injector. For any type T that can be injected, you can also inject Provider<T>. Compared to injecting T directly, injecting Provider<T> enables:

For example:

  class Car {
    @Inject Car(Provider<Seat> seatProvider) {
      Seat driver = seatProvider.get();
      Seat passenger = seatProvider.get();
      ...
    }
  }


Method Summary
 T get()
          Provides a fully-constructed and injected instance of T
 

Method Detail

get

T get()
Provides a fully-constructed and injected instance of T



Copyright © 2006-2012. All Rights Reserved.