/** Convert an item from a list into a class using the classes constructor. * * REFACTOR: Can't this just be from collection? * REFACTOR * * @param fieldsAccessor how we are going to access the fields (by field, by property, combination) * @param argList list if arguments * @param clazz the type of the object we are creating * @param <T> generics * @return the new object that we just created. */ public static <T> T fromList( FieldsAccessor fieldsAccessor, List<?> argList, Class<T> clazz ) { return new MapperComplex(fieldsAccessor, null, null, false).fromList(argList, clazz); }
/** Convert an item from a list into a class using the classes constructor. * * REFACTOR: Can't this just be from collection? * REFACTOR * * @param fieldsAccessor how we are going to access the fields (by field, by property, combination) * @param argList list if arguments * @param clazz the type of the object we are creating * @param <T> generics * @return the new object that we just created. */ public static <T> T fromList( FieldsAccessor fieldsAccessor, List<?> argList, Class<T> clazz ) { return new MapperComplex(fieldsAccessor, null, null, false).fromList(argList, clazz); }
/** Convert an item from a list into a class using the classes constructor. * * REFACTOR: Can't this just be from collection? * REFACTOR * * @param respectIgnore honor @JsonIgnore, transients, etc. of the field * @param view honor views for fields * @param fieldsAccessor how we are going to access the fields (by field, by property, combination) * @param argList list if arguments * @param clazz the type of the object we are creating * @param ignoreSet a set of properties to ignore * @param <T> generics * @return the new object that we just created. */ public static <T> T fromList( boolean respectIgnore, String view, FieldsAccessor fieldsAccessor, List<?> argList, Class<T> clazz, Set<String> ignoreSet ) { return new MapperComplex(fieldsAccessor, ignoreSet, view, respectIgnore).fromList(argList, clazz); }
/** Convert an item from a list into a class using the classes constructor. * * REFACTOR: Can't this just be from collection? * REFACTOR * * @param respectIgnore honor @JsonIgnore, transients, etc. of the field * @param view honor views for fields * @param fieldsAccessor how we are going to access the fields (by field, by property, combination) * @param argList list if arguments * @param clazz the type of the object we are creating * @param ignoreSet a set of properties to ignore * @param <T> generics * @return the new object that we just created. */ public static <T> T fromList( boolean respectIgnore, String view, FieldsAccessor fieldsAccessor, List<?> argList, Class<T> clazz, Set<String> ignoreSet ) { return new MapperComplex(fieldsAccessor, ignoreSet, view, respectIgnore).fromList(argList, clazz); }
value = fromList((List) value, valueType); key = fromList((List) key, keyType); value = fromList(listItem, parameterClass ); o = fromList( fromList, componentType ); newList.add( o ); o = fromList(fromList, componentType); convertedArgumentList.set(index, fromList((List<Object>) item, parameterClass)); return true; case MAP:
value = fromList((List) value, valueType); key = fromList((List) key, keyType); value = fromList(listItem, parameterClass ); o = fromList( fromList, componentType ); newList.add( o ); o = fromList(fromList, componentType); convertedArgumentList.set(index, fromList((List<Object>) item, parameterClass)); return true; case MAP:
break; case LIST: objValue = fromList((List<Object>) objValue, clazz); break;
break; case LIST: objValue = fromList((List<Object>) objValue, clazz); break;
if (collection instanceof List) { try { Object value = fromList( (List) collection, field.getComponentClass()); field.setValue(newInstance, value); } catch (Exception ex) {
if (collection instanceof List) { try { Object value = fromList( (List) collection, field.getComponentClass()); field.setValue(newInstance, value); } catch (Exception ex) {