Only generate code for some methods on a service

@danrice-square @loganj 

Call type.split("#") once and save the result.