public Object getProperty(Object object, String name) throws Exception {
    Object result = null;
    try {
      Class<?> c = object.getClass();
      Field field = c.getDeclaredField(name);
      if (!Modifier.isPublic(field.getModifiers())) {
        throw new Exception(
          "Property " + object.toString() + "." + name +
          " hasn't public modifier.");
      }
      result = field.get(object);
    }
    catch (NoSuchFieldException exc) {
      throw new Exception(
        "Property <" + name + ">" +
        " not found in Object <" + object.toString() + ">.");
    }
    catch (IllegalAccessException exc) {
      throw new Exception(
        "Property <" + name + "> in Object <" + object.toString() + ">" +
        " is access denied.");
    }
    return result;
  }