docs: public void defineProperty(String propertyName, Class<?> clazz,
                                 int attributes)
      {
          int length = propertyName.length();
          if (length == 0) throw new IllegalArgumentException();
          char[] buf = new char[3 + length];
          propertyName.getChars(0, length, buf, 3);
          buf[3] = Character.toUpperCase(buf[3]);
          buf[0] = 'g';
          buf[1] = 'e';
          buf[2] = 't';
          String getterName = new String(buf);
          buf[0] = 's';
          String setterName = new String(buf);
  
          Method[] methods = FunctionObject.getMethodList(clazz);
          Method getter = FunctionObject.findSingleMethod(methods, getterName);
          Method setter = FunctionObject.findSingleMethod(methods, setterName);
          if (setter == null)
              attributes |= ScriptableObject.READONLY;
          defineProperty(propertyName, null, getter,
                         setter == null ? null : setter, attributes);
      }