Handler(Main main) {
this.main = main;
this.service = main.getService()
}
//или
Handler(Main main, Service service) {
this.main = main;
this.service = service;
}
Handler(ServiceFactory factory) {
this.factory = factory;
this.service = factory.createService()
}
@Inject Main main;
@Inject Service service;
Handler(){
}