A fast and easy to use dependency injection framework for Android and Java.
[TODO: plugin]
Add @Inject
annotations to the fields you wish to inject.
public class YourClass
{
@Inject
private OtherClass other;
...
}
[TODO]
[TODO]
Interfaces can be injected by creating @Provides
methods.
public class ExampleInterfaceProvider
{
@Provides
public ExampleInterface make()
{
return new ConcreteImpl(...);
}
}
An extra compilation step which modifies the generated bytecode is added. Inserts initialisation code for @Inject
annotated fields in the constructor.