Richard,
From the point of view of the OCP exam (the forum this is in), you can't. In real life,
you should try to avoid it. If you can't, the solution is to use reflection. This
thread explains why you can't use generics for this and shows the code using for reflection.
As far as how to avoid it, you'd refactor the code to pass in an empty set:
I realize your code is probably more involved than this simplified example. But the idea still holds. Have the caller pass in the object rather than the type.