code: private void buildSlots(ObjectStreamField[] fields) {
          slotsToSerialize = new ObjectSlot[fields.length];
          for (int i = 0; i < fields.length; i++) {
              ObjectSlot s = new ObjectSlot();
              slotsToSerialize[i] = s;
              s.field = fields[i];
          }
          // We assume the slots are already sorted in the right shape for dumping
      }
docs: Build emulated slots that correspond to emulated fields. A slot is a
  field descriptor (ObjectStreamField) plus the actual value it holds.
  
  @param fields
  an array of ObjectStreamField, which describe the fields to be
  emulated (names, types, etc).