code: public void setValueChangeListener(MethodBinding valueChangeListener) {
  
          ValueChangeListener[] curListeners = getValueChangeListeners();
          // see if we need to null-out, or replace an existing listener
          if (null != curListeners) {
              for (int i = 0; i < curListeners.length; i++) {
                  // if we want to remove the valueChangeListener
                  if (null == valueChangeListener) {
                      // We are guaranteed to have at most one instance of
                      // MethodBindingValueChangeListener in the curListeners
                      // list.
                      if (MethodBindingValueChangeListener.class ==
                           curListeners[i].getClass()) {
                          removeFacesListener(curListeners[i]);
                          return;
                      }
                  }
                  // if we want to replace the valueChangeListener
                  else //noinspection ObjectEquality
                      if (valueChangeListener == curListeners[i]) {
                      removeFacesListener(curListeners[i]);
                      break;
                  }
              }
          }
          addValueChangeListener(new MethodBindingValueChangeListener(valueChangeListener));
      }
docs: {@inheritDoc}
  
  @deprecated Use {@link #addValueChangeListener} instead, obtaining the
  argument {@link ValueChangeListener} by creating an instance of {@link
  javax.faces.event.MethodExpressionValueChangeListener}.