Hi I have a very simple dagger questions for android.
class Fooz {
@Inject Foo1 mFoo1;
public Fooz() {
....
}
}
class Fooz {
private Foo1 mFoo1;
@Inject public Fooz(Foo1 foo1) {
mFoo1 = foo1;
}
}
How are the two classes identical? The first one injects Foo1 field directly while the second one assignes mFoo1 in the constructor. For the second one, does Foo1 get injected from object graph as soon as Fooz is created and added to object graph? If they are different, why so? Thanks!