(Object obj, String propName, Object value)
| 763 | |
| 764 | |
| 765 | public static void setObjectProperty(Object obj, String propName, Object value) throws ReflectError, UtilEvalError { |
| 766 | String accessorName = accessorName("set", propName); |
| 767 | Object[] args = new Object[]{value}; |
| 768 | |
| 769 | Interpreter.debug("property access: "); |
| 770 | try { |
| 771 | Method method = resolveExpectedJavaMethod(null/*bcm*/, obj.getClass(), obj, accessorName, args, false); |
| 772 | invokeMethod(method, obj, args); |
| 773 | } catch (InvocationTargetException e) { |
| 774 | throw new UtilEvalError("Property accessor threw exception: " + e.getTargetException()); |
| 775 | } |
| 776 | } |
| 777 | |
| 778 | |
| 779 | /** |
no test coverage detected