I'm trying to use Guice to instantiate my Objectify DAOs. My hierarchy is 
the following:

public class EmpresaDao extends ObjectifyDao<Empresa> { ... }

public class ObjectifyDao<T> extends DAOBase { ... }

When I use "new EmpresaDao()", getClass().getGenericSuperclass() gives me:

    [INFO] superclass -> 
br.com.xxxxx.server.service.ObjectifyDao<br.com.xxxxx.domain.Empresa>

When I use "injector.getInstance(EmpresaDao.class)", 
getClass().getGenericSuperclass() gives me:

    [INFO] superclass -> class br.com.xxxx.server.service.EmpresaDao

Obviously, I want to let Guice instantiate my objects with DI.

Can someone explain why this is happen?

Is there any way (instantiating with Guice) to get the same superclass as 
with new().

Thanks.

-- 
You received this message because you are subscribed to the Google Groups 
"google-guice" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/google-guice/-/nD9OpdD__GEJ.
To post to this group, send email to google-guice@googlegroups.com.
To unsubscribe from this group, send email to 
google-guice+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-guice?hl=en.

Reply via email to