Java - How to pass a Generic parameter as Class<T> to a constructor
- by Joe Almore
I have a problem here that still cannot solve, the thing is I have this abstract class:
public abstract class AbstractBean<T> {
private Class<T> entityClass;
public AbstractBean(Class<T> entityClass) {
this.entityClass = entityClass;
}...
Now I have another class that inherits this abstract:
@Stateless
@LocalBean
public…