I have this abstract class
public abstract class GenericScheduleController implements Serializable {
@Inject
private Service service;
@PostConstruct
private void init() {
service.doSomething(getLabel());
}
protected abstract String getLabel();
}
and I would like programmatically inject a new one dynamically.
public <T extends GenericScheduleController> T getScheduleController(String chaine) {
//TODO
//get new CDI instance programmatically with abstract getLabel() return chaine
}
Is it possible ?
Thx