excilys/androidannotations — Issue #128: Inject a specific @Bean implementation
Author: pyricau
Created: 2012-03-08 11:51:24+00:00
State: open

The goal is be to add a bit of DI configuration, without forgetting our compile time constraints.

The idea here is to have an interface / superclass field, and specify its implementation on the `@Bean` annotation.

Would that provide decoupling advantages ? Well, the class would still know about its dependencies implementation, but at least the code using those dependencies would have to rely on the API, which is an interesting goal.

Example :

```java
@EActivity
public class MyActivity extends Activity {

@Bean(MyImplementation.class)
MyInterface something;

}
```