private List<?> mapArrayToList(Object srcObj, Object srcCollectionValue, FieldMap fieldMap, Object destObj) { Class<?> destEntryType; if (fieldMap.getDestHintContainer() != null) { destEntryType = fieldMap.getDestHintContainer().getHint(); } else { destEntryType = srcCollectionValue.getClass().getComponentType(); } List<?> srcValueList; if (CollectionUtils.isPrimitiveArray(srcCollectionValue.getClass())) { srcValueList = CollectionUtils.convertPrimitiveArrayToList(srcCollectionValue); } else { srcValueList = Arrays.asList((Object[]) srcCollectionValue); } return addOrUpdateToList(srcObj, fieldMap, srcValueList, destObj, destEntryType); }
private List<?> mapArrayToList(Object srcObj, Object srcCollectionValue, FieldMap fieldMap, Object destObj, MappingContext context) { Class<?> destEntryType; if (fieldMap.getDestHintContainer() != null) { destEntryType = fieldMap.getDestHintContainer().getHint(); } else { destEntryType = srcCollectionValue.getClass().getComponentType(); } List<?> srcValueList; if (CollectionUtils.isPrimitiveArray(srcCollectionValue.getClass())) { srcValueList = CollectionUtils.convertPrimitiveArrayToList(srcCollectionValue); } else { srcValueList = Arrays.asList((Object[]) srcCollectionValue); } return addOrUpdateToList(srcObj, fieldMap, srcValueList, destObj, destEntryType, context); }
private List<?> mapArrayToList(Object srcObj, Object srcCollectionValue, FieldMap fieldMap, Object destObj, MappingContext context) { Class<?> destEntryType; if (fieldMap.getDestHintContainer() != null) { destEntryType = fieldMap.getDestHintContainer().getHint(); } else { destEntryType = srcCollectionValue.getClass().getComponentType(); } List<?> srcValueList; if (CollectionUtils.isPrimitiveArray(srcCollectionValue.getClass())) { srcValueList = CollectionUtils.convertPrimitiveArrayToList(srcCollectionValue); } else { srcValueList = Arrays.asList((Object[]) srcCollectionValue); } return addOrUpdateToList(srcObj, fieldMap, srcValueList, destObj, destEntryType, context); }