I have a class:
public abstract class BaseDaoImpl<T extends BaseModel> implements BaseDao<T> {
}
I'm also using annotations to generate SQL queries (for various reasons I'm not able to use a framework such as hibernate) such as @Table & @Column
I would like to be able to retrieve the <T extends BaseModel>
.class
instance without having to take T
as an input on a method.
I suppose the easy alternative would be to create a method:
public void set(Class<T> clazz){}
However I'd like to avoid this if possible to keep my code as streamlined as possible. Is this possible?