Are you trying to avoid reproducing the array of contentType strings? I could push a kind of goofy bit of reflection that pulls the values out of the Produces annotation.