code: public ObjectStreamField getField(String name) {
          ObjectStreamField[] allFields = getFields();
          for (int i = 0; i < allFields.length; i++) {
              ObjectStreamField f = allFields[i];
              if (f.getName().equals(name)) {
                  return f;
              }
          }
          return null;
      }
docs: Gets a field descriptor of the class represented by this class
  descriptor.
  
  @param name
  the name of the desired field.
  @return the field identified by {@code name} or {@code null} if there is
  no such field.