GIN can do member injection on already created instances.
You have to create a method in your Ginjector
interface that takes such an instance as argument, with a return type of void
.
Note that because no reflection is done on the client, GIN will only inject fields and methods from the class used as the argument type (and its super-classes).
@GinModules(MyGinModule.class)
interface MyGinjector extends Ginjector {
…
void injectIsTreeItemMembers(IsTreeItem item);
}