Class BranchedSuggestedFixes

java.lang.Object
com.google.errorprone.fixes.BranchedSuggestedFixes

public class BranchedSuggestedFixes extends Object
Helper class for accumulating a branching tree of alternative fixes designed to help build as set of potential fixes with different options in them.

Consider building a list of fixes from a set of operations A followed by B or C then D or E. The resulting list should be ABD, ACD, ABE, ACE.


 BranchedSuggestedFixes a = BranchedSuggestedFixes.builder()
   .startWith(A)
   .then()
   .addOption(B)
   .addOption(C)
   .then()
   .addOption(D)
   .addOption(E)
   .build();
 
This class assumes that in order to build a valid set of fixes you must make some progress at each branch. So two calls to branch with no merges in between will result in an empty list of fixes at the end.
Author:
andrewrice@google.com (Andrew Rice)