dagger
dagger copied to clipboard
@Module.injects + concrete types + @Provides
Say I have:
final class Foo {}
And a module that looks like the following:
@Module(injects = Foo.class)
final class FooModule {
@Provides Foo provideFoo() {
return new Foo();
}
}
The generated module adapter will have the following line:
private static final String[] INJECTS = { "members/Foo" };
While in practice this binding won't be exercised, a no-op binding is being created using ReflectiveAtInjectBinding
. All of that unnecessary reflection has been found to be expensive in some applications.