@SuppressWarnings({ "rawtypes", "unchecked" }) @Test public void testWriteWrongType() { Assertions.assertThrows(RuntimeException.class, () -> { ((PropertyAccessor)stringAccessor).setPropertyValue(testObject, 5); }); }
public void setPropertyValue(T boundObject, @CheckForNull V value) { writeMethod.writeValue(boundObject, value); }
PropertyAccessor { public void setPropertyValue(T boundObject, @CheckForNull V value) { writeMethod.writeValue(boundObject, value); } }
PropertyAccessor { public void setPropertyValue(T boundObject, @CheckForNull V value) { writeMethod.writeValue(boundObject, value); } PropertyAccessor(Class<? extends T> boundClass, String propertyName); }
PropertyAccessor { public void setPropertyValue(T boundObject, @CheckForNull V value) { writeMethod.writeValue(boundObject, value); } PropertyAccessor(Class<? extends T> boundClass, String propertyName); String getPropertyName(); V getPropertyValue(T boundObject); void setPropertyValue(T boundObject, @CheckForNull V value); void invoke(T boundObject); boolean canWrite(); boolean canInvoke(); boolean canRead(); Class<?> getValueClass(); }
PropertyAccessor { public void setPropertyValue(T boundObject, @CheckForNull V value) { writeMethod.writeValue(boundObject, value); } PropertyAccessor(Class<? extends T> boundClass, String propertyName); String getPropertyName(); V getPropertyValue(T boundObject); void setPropertyValue(T boundObject, @CheckForNull V value); void invoke(T boundObject); boolean canWrite(); boolean canInvoke(); boolean canRead(); Class<?> getValueClass();  }