generate mapping methods declared in super-classes or implemented interfaces

Fixes #165.