title: Making a small change to a Java protocol buffers object
body: <p>I want to make a small change, deep in tree of Java protocol buffer objects.</p>
  
  <p>I can use the <code>.getBuilder()</code> method to make a new object that is a clone of an old one with some changes.</p>
  
  <p>When this is done at a deep level, the code becomes ugly:</p>
  
  <pre><code>Quux.Builder quuxBuilder = foo.getBar().getBaz().getQuux().toBuilder()
  Baz.Builder bazBuilder = foo.getBar().getBaz().toBuilder()
  Bar.Builder barBuilder = foo.getBar().toBuilder()
  Foo.Builder fooBuilder = foo.toBuilder()
  
  quuxBuilder.setNewThing(newThing);
  bazBuilder.setQuux(quuxBuilder);
  barBuilder.setBaz(bazBuilder);
  fooBuilder.setBar(barBuilder);
  
  Foo newFoo = fooBuilder.build();
  </code></pre>
  
  <p>(This is just 4 levels, I'm routinely dealing with 5-8 levels.)</p>
  
  <p>Is there a better way?</p>