code: public Object saveState(FacesContext context) {
  
          if (context == null) {
              throw new NullPointerException();
          }
          
          // If initial state has been marked, we don't need to
          // save any state.
          if (initialStateMarked()) {
              return null;
          }
  
          // At the moment, the only state we need to save is our listeners
          return UIComponentBase.saveAttachedState(context, listeners);
      }
docs: <p class="changed_added_2_0">Implementation of
  {@link javax.faces.component.StateHolder#saveState}.