public int compare(ProviderInfo<MessageBodyWriter> p1,
ProviderInfo<MessageBodyWriter> p2) {
MessageBodyWriter e1 = p1.getProvider();
MessageBodyWriter e2 = p2.getProvider();
ProduceMime c = e1.getClass().getAnnotation(ProduceMime.class);
String[] mimeType1 = {"*/*"};
if (c != null) {
mimeType1 = c.value();
}
ProduceMime c2 = e2.getClass().getAnnotation(ProduceMime.class);
String[] mimeType2 = {"*/*"};
if (c2 != null) {
mimeType2 = c2.value();
}
return compareString(mimeType1[0], mimeType2[0]);
}