Add `generic-type` sample.

This explains the technique I've seen where in a certain framework one has
to create anonymous subclasses instead of regular instances for type
detection purposes.