if (mtaccessor != null) {
Object mtvalue = eval(mtaccessor, contentValue);
mediatype = mtvalue != null ? toString(mtvalue) : null;
}
if (mediatype == null) {
MediaType mt = valueContext.getAnnotation(MediaType.class);
mediatype = mt != null && !mt.value().equals(DEFAULT) ? mt.value() : null;
}
if (mediatype != null)
sw.writeAttribute("type", mediatype);
}