Extend generator to support matchers of generic types.