
Inspired by Han-Wen's entirely reasonable annotation of the "stored" argument to the FieldDef constructor[1], I thought this smells like it could use the builder pattern to improve readability. Passing a functional interface to the build method also means we can use lambdas, for an overall significant boilerplate reduction: many FieldDefs can now be one-liners. [1] https://gerrit-review.googlesource.com/c/98014/9/gerrit-server/src/main/java/com/google/gerrit/server/index/change/ChangeField.java#606 Change-Id: I845a7d9a28dda7f3e0cc0c049b94372118eb4480