@Override
 public Object get(Object object) {
   try {
     property.getReadMethod().setAccessible(true); // issue 50
     return property.getReadMethod().invoke(object);
   } catch (Exception e) {
     throw new YAMLException(
         "Unable to find getter for property '"
             + property.getName()
             + "' on object "
             + object
             + ":"
             + e);
   }
 }
 public MethodProperty(PropertyDescriptor property) {
   super(
       property.getName(),
       property.getPropertyType(),
       property.getReadMethod() == null ? null : property.getReadMethod().getGenericReturnType());
   this.property = property;
   this.readable = property.getReadMethod() != null;
   this.writable = property.getWriteMethod() != null;
 }
 @Override
 public void set(Object object, Object value) throws Exception {
   property.getWriteMethod().invoke(object, value);
 }