Class SuggestedFix

java.lang.Object
com.google.javascript.refactoring.SuggestedFix

public final class SuggestedFix extends Object
Object representing the fixes to apply to the source code to create the refactoring CL. To create a class, use the SuggestedFix.Builder class and helper functions.
  • Method Details

    • getMatchedNodeInfo

      public SuggestedFix.MatchedNodeInfo getMatchedNodeInfo()
      Returns information about the original JS Compiler Node that caused this SuggestedFix to be constructed.
    • getReplacements

      public com.google.common.collect.SetMultimap<String,CodeReplacement> getReplacements()
      Returns a multimap from filename to all the replacements that should be applied for this given fix.
    • getDescription

      public @Nullable String getDescription()
    • getAlternatives

      public com.google.common.collect.ImmutableList<SuggestedFix> getAlternatives()
      Get all possible fixes for this problem, including this fix.
    • getNonDefaultAlternatives

      public com.google.common.collect.ImmutableList<SuggestedFix> getNonDefaultAlternatives()
      Get all alternative fixes, excluding this fix.
    • toString

      public String toString()
      Overrides:
      toString in class Object