code: private void wrapSetterMethod(ClassNode classNode, boolean bindable, String propertyName) {
          String getterName = "get" + MetaClassHelper.capitalize(propertyName);
          MethodNode setter = classNode.getSetterMethod("set" + MetaClassHelper.capitalize(propertyName));
  
          if (setter != null) {
              // Get the existing code block
              Statement code = setter.getCode();
  
              Expression oldValue = varX("$oldValue");
              Expression newValue = varX("$newValue");
              Expression proposedValue = varX(setter.getParameters()[0].getName());
              BlockStatement block = new BlockStatement();
  
              // create a local variable to hold the old value from the getter
              block.addStatement(declS(oldValue, callThisX(getterName)));
  
              // add the fireVetoableChange method call
              block.addStatement(stmt(callThisX("fireVetoableChange", args(
                      constX(propertyName), oldValue, proposedValue))));
  
              // call the existing block, which will presumably set the value properly
              block.addStatement(code);
  
              if (bindable) {
                  // get the new value to emit in the event
                  block.addStatement(declS(newValue, callThisX(getterName)));
  
                  // add the firePropertyChange method call
                  block.addStatement(stmt(callThisX("firePropertyChange", args(constX(propertyName), oldValue, newValue))));
              }
  
              // replace the existing code block with our new one
              setter.setCode(block);
          }
      }
docs: Wrap an existing setter.