code: public Field field(int tag) {
      for (Field field : declaredFields) {
        if (field.tag() == tag) {
          return field;
        }
      }
      for (Field field : extensionFields) {
        if (field.tag() == tag) {
          return field;
        }
      }
      return null;
    }
docs: Returns the field tagged {@code tag}, or null if this type has no such field.