@Test public void shouldInvokePubliclyAvailableSetter() { ReflectionSetterInvokerTestObject testObject = new ReflectionSetterInvokerTestObject(); boolean invoked = reflectionSetterInvoker.invokeSetter(testObject, "TEST"); assertThat(invoked).isTrue(); assertThat(testObject.inconventionalSetterArg).isEqualTo("TEST"); }
public boolean invokeSetter(Object setterHostObject, Object forArg) { Method setter = findSetter(setterHostObject.getClass(), forArg); if(setter == null) { return false; } invokerSetter(setter, setterHostObject, forArg); return true; }
ReflectionSetterInvoker { public boolean invokeSetter(Object setterHostObject, Object forArg) { Method setter = findSetter(setterHostObject.getClass(), forArg); if(setter == null) { return false; } invokerSetter(setter, setterHostObject, forArg); return true; } }
ReflectionSetterInvoker { public boolean invokeSetter(Object setterHostObject, Object forArg) { Method setter = findSetter(setterHostObject.getClass(), forArg); if(setter == null) { return false; } invokerSetter(setter, setterHostObject, forArg); return true; }  }
ReflectionSetterInvoker { public boolean invokeSetter(Object setterHostObject, Object forArg) { Method setter = findSetter(setterHostObject.getClass(), forArg); if(setter == null) { return false; } invokerSetter(setter, setterHostObject, forArg); return true; }  boolean invokeSetter(Object setterHostObject, Object forArg); static void invokerSetter(Method setter, Object setterHostObject, Object argument); Method findSetter(Class<?> setterHostClass, Object forArg); }
ReflectionSetterInvoker { public boolean invokeSetter(Object setterHostObject, Object forArg) { Method setter = findSetter(setterHostObject.getClass(), forArg); if(setter == null) { return false; } invokerSetter(setter, setterHostObject, forArg); return true; }  boolean invokeSetter(Object setterHostObject, Object forArg); static void invokerSetter(Method setter, Object setterHostObject, Object argument); Method findSetter(Class<?> setterHostClass, Object forArg);  }