Ejemplo n.º 1
0
 public static void setPropertyOnSuper(
     Object messageArgument, Class senderClass, GroovyObject receiver, String messageName)
     throws Throwable {
   try {
     InvokerHelper.setAttribute(receiver, messageName, messageArgument);
   } catch (GroovyRuntimeException gre) {
     throw unwrap(gre);
   }
 }
Ejemplo n.º 2
0
 public static void setFieldOnSuper(
     Object messageArgument, Class senderClass, Object receiver, String messageName)
     throws Throwable {
   try {
     if (receiver instanceof Class) {
       InvokerHelper.setAttribute(receiver, messageName, messageArgument);
     } else {
       MetaClass mc = ((GroovyObject) receiver).getMetaClass();
       mc.setAttribute(senderClass, receiver, messageName, messageArgument, true, true);
     }
   } catch (GroovyRuntimeException gre) {
     throw unwrap(gre);
   }
 }