On Saturday, April 20, 2013 11:46:45 AM UTC+2, Mohammad Al-Quraian wrote:
Good question, I don't even know how they are instantiated!
I just got a CellList declared as:
private final CellList<Presentable> cellList = new CellList<Presentable>(new TileCell());
'new' TileCell. If you have dependencies in TileCell that you want to be automatically injected, then have TileCell injected into your class as well.
How are they instaniated, sorry I just started learning about cells.
It's not about cells, it's about Java. DI doesn't magically plug into the compiler; GIN et al. only generate code that you could have written yourself.
Start to learn about DI "by hand" (ever seen the ClientFactory from the GWT tutorials?) to "get" the concept, then use a tool that will generate that ClientFactory for you (ClientFactory will be an interface extending Ginjector if you use GIN).
Alternatively, look at the code generated by GIN (pass -gen to the compiler or DevMode)