@Test public void testLongProperty() { PropertyAccessor<TestObject, Long> propertyAccessor = new PropertyAccessor<>(TestObject.class, TestObject.READ_ONLY_LONG_PROPERTY); Long propertyValue = propertyAccessor.getPropertyValue(testObject); assertEquals(42, propertyValue.longValue()); }
public V getPropertyValue(T boundObject) { return readMethod.readValue(boundObject); }
PropertyAccessor { public V getPropertyValue(T boundObject) { return readMethod.readValue(boundObject); } }
PropertyAccessor { public V getPropertyValue(T boundObject) { return readMethod.readValue(boundObject); } PropertyAccessor(Class<? extends T> boundClass, String propertyName); }
PropertyAccessor { public V getPropertyValue(T boundObject) { return readMethod.readValue(boundObject); } 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 V getPropertyValue(T boundObject) { return readMethod.readValue(boundObject); } 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();  }