private List<ProducesMethod> getProducingMethods(Class<?> assetType, MediaType mediaType) {
// collect all the methods that are annotated with @Produces
List<ProducesMethod> locators = new LinkedList<ProducesMethod>();
Method[] methods = assetType.getMethods();
for (Method method : methods) {
Produces annotation = method.getAnnotation(Produces.class);
if (annotation != null) {
String[] producesArray =
AnnotationUtils.parseConsumesProducesValues(annotation.value());
List<MediaType> produces = toSortedMediaTypes(producesArray);
for (MediaType mt : produces) {
if (mt.isCompatible(mediaType)) {
ProducesMethod prodcuesMethod = new ProducesMethod(method, mt);
if (prodcuesMethod.getType() != null) {