@Test public void testGetValue() { final Object value = tested.getValue(instance); assertEquals(FOO1_VALUE, value); }
@Override public Object getValue(final T property) { if (null != property) { Class<?> c = property.getClass(); while (!(c.isAssignableFrom(Object.class))) { Field[] fields = c.getDeclaredFields(); for (Field field : fields) { Value annotation = field.getAnnotation(Value.class); if (null != annotation) { try { return _getValue(field, annotation, property); } catch (Exception e) { LOG.error("Error obtaining annotated value for Property with id " + getId(property), e); } } } c = c.getSuperclass(); } } return null; }
BackendPropertyAdapter extends AbstractReflectAdapter<T> implements PropertyAdapter<T, Object> { @Override public Object getValue(final T property) { if (null != property) { Class<?> c = property.getClass(); while (!(c.isAssignableFrom(Object.class))) { Field[] fields = c.getDeclaredFields(); for (Field field : fields) { Value annotation = field.getAnnotation(Value.class); if (null != annotation) { try { return _getValue(field, annotation, property); } catch (Exception e) { LOG.error("Error obtaining annotated value for Property with id " + getId(property), e); } } } c = c.getSuperclass(); } } return null; } }
BackendPropertyAdapter extends AbstractReflectAdapter<T> implements PropertyAdapter<T, Object> { @Override public Object getValue(final T property) { if (null != property) { Class<?> c = property.getClass(); while (!(c.isAssignableFrom(Object.class))) { Field[] fields = c.getDeclaredFields(); for (Field field : fields) { Value annotation = field.getAnnotation(Value.class); if (null != annotation) { try { return _getValue(field, annotation, property); } catch (Exception e) { LOG.error("Error obtaining annotated value for Property with id " + getId(property), e); } } } c = c.getSuperclass(); } } return null; }  }
BackendPropertyAdapter extends AbstractReflectAdapter<T> implements PropertyAdapter<T, Object> { @Override public Object getValue(final T property) { if (null != property) { Class<?> c = property.getClass(); while (!(c.isAssignableFrom(Object.class))) { Field[] fields = c.getDeclaredFields(); for (Field field : fields) { Value annotation = field.getAnnotation(Value.class); if (null != annotation) { try { return _getValue(field, annotation, property); } catch (Exception e) { LOG.error("Error obtaining annotated value for Property with id " + getId(property), e); } } } c = c.getSuperclass(); } } return null; }  @Override String getId(final T property); @Override String getCaption(final T property); @Override Object getValue(final T property); @Override void setValue(final T property,
                         final Object value); @Override boolean accepts(final Class<?> pojo); }
BackendPropertyAdapter extends AbstractReflectAdapter<T> implements PropertyAdapter<T, Object> { @Override public Object getValue(final T property) { if (null != property) { Class<?> c = property.getClass(); while (!(c.isAssignableFrom(Object.class))) { Field[] fields = c.getDeclaredFields(); for (Field field : fields) { Value annotation = field.getAnnotation(Value.class); if (null != annotation) { try { return _getValue(field, annotation, property); } catch (Exception e) { LOG.error("Error obtaining annotated value for Property with id " + getId(property), e); } } } c = c.getSuperclass(); } } return null; }  @Override String getId(final T property); @Override String getCaption(final T property); @Override Object getValue(final T property); @Override void setValue(final T property,
                         final Object value); @Override boolean accepts(final Class<?> pojo);  }