return context.getMappingEngine().createDestination(context);
}
@Override
protected Class<?> getElementType(MappingContext<Object, Collection<Object>> context) {
Mapping mapping = context.getMapping();
if (mapping instanceof PropertyMapping) {
PropertyInfo destInfo = ((PropertyMapping) mapping).getLastDestinationProperty();
Class<?> elementType = TypeResolver.resolveArgument(destInfo.getGenericType(),
destInfo.getInitialType());
return elementType == Unknown.class ? Object.class : elementType;