public Object getValue(Object self) {
        try {
            Object[] params = {};
            if (readMethod != null) {
                return readMethod.invoke(self, params);
            } else if (field != null) {
                return field.get(self);
            } else {
                throw new RuntimeException("Field or field getter missing: " + name);
            }
        } catch (InvocationTargetException ex) {
            throw new RuntimeException(ex);
        } catch (IllegalAccessException ex) {
            throw new RuntimeException(ex);
        }
    }