if (ann != null) {
ext = ann.value().newInstance();
} else {
org.infinispan.marshall.SerializeWith legacy = type.getAnnotation(org.infinispan.marshall.SerializeWith.class);
if (legacy != null) {
ext = new LegacyExternalizerAdapter(legacy.value().newInstance());
} else {
// Check for JBoss Marshaller's @Externalize
return jbmarExtFactory.getExternalizer(type);
}
}