code: public void clear() {
      messages = Collections.emptyList();
      isMessagesListMutable = false;
      if (builders != null) {
        for (SingleFieldBuilder<MType, BType, IType> entry :
            builders) {
          if (entry != null) {
            entry.dispose();
          }
        }
        builders = null;
      }
      onChanged();
      incrementModCounts();
    }
docs: Removes all of the elements from this list.
  The list will be empty after this call returns.