TranslationSource translationSource) {
if (value == null) {
return null;
} else if (value instanceof Collection) {
if (property.shouldBeTranslated()) {
throw new TranslationException(
"Cannot use @Translate on a collection (cannot determine internal type due to erasure); use @TranslateCollection instead.");
}
return transformCollection(value, property, translationSource);
} else if (value.getClass().isArray()) {
return transformArray((Object[]) value, property, translationSource);