@Test void testListObjectPropertyField() throws Exception { TypedListConfigClass instance = new TypedListConfigClass(); Class<TypedListConfigClass> clazz = TypedListConfigClass.class; ObjectPropertyField field_integerList = new ObjectPropertyField(clazz.getDeclaredField("integerList"), propName); field_integerList.applyValueParser(instance, "1,2,3"); assertEquals(Stream.of(1, 2, 3).collect(Collectors.toList()), instance.integerList); }
void applyValueParser(Object instance, String value) { try { field.set(instance, valueParser.apply(value)); } catch (IllegalAccessException e) { throw ThrowableUtil.propagate(e); } }
ObjectPropertyField { void applyValueParser(Object instance, String value) { try { field.set(instance, valueParser.apply(value)); } catch (IllegalAccessException e) { throw ThrowableUtil.propagate(e); } } }
ObjectPropertyField { void applyValueParser(Object instance, String value) { try { field.set(instance, valueParser.apply(value)); } catch (IllegalAccessException e) { throw ThrowableUtil.propagate(e); } } ObjectPropertyField(Field field, String propertyName); }
ObjectPropertyField { void applyValueParser(Object instance, String value) { try { field.set(instance, valueParser.apply(value)); } catch (IllegalAccessException e) { throw ThrowableUtil.propagate(e); } } ObjectPropertyField(Field field, String propertyName);  }
ObjectPropertyField { void applyValueParser(Object instance, String value) { try { field.set(instance, valueParser.apply(value)); } catch (IllegalAccessException e) { throw ThrowableUtil.propagate(e); } } ObjectPropertyField(Field field, String propertyName);   }