I have this method signature:
public int nrOfEntities(Class<? extends MailConfirmation> clazz, User user, String email)
I would like nrOfEntities to return the number of entities that:
- Are of the concrete class clazz
- Have a matching User if user != null
- Have a matching email if user == null
It's the class matching I'm having a problem with. I've tried a few statements without any luck.