Hi,

it might seems to be a stupid question, but what is exactly the
difference between :

public class Foo {
  @inject
  private Injector injector;

  public void bar() {
    MyClass c = injector.inject(MyClass.class);
  }
}

and :

public class Foo {
  @inject
  private Provider<MyClass> myClassProvider;

  public void bar() {
    MyClass c = myClassProvider.get();
  }
}


What is the best to use ?

-- 
You received this message because you are subscribed to the Google Groups 
"google-guice" 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?hl=en.

Reply via email to