public static void setGroovyObjectProperty( Object messageArgument, Class senderClass, GroovyObject receiver, String messageName) throws Throwable { try { receiver.setProperty(messageName, messageArgument); } catch (GroovyRuntimeException gre) { throw unwrap(gre); } }
public static void setGroovyObjectPropertySafe( Object messageArgument, Class senderClass, GroovyObject receiver, String messageName) throws Throwable { if (receiver == null) return; receiver.setProperty(messageName, messageArgument); }