Support for interfaces and classes with generic parameters and constraints

Fix #4