Class ErrorToFixMapper

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

public final class ErrorToFixMapper extends Object
Maps a JSError to a list of SuggestedFixes, if possible. TODO(tbreisacher): Move this into the compiler itself (i.e. into the jscomp package). This will make it easier for people adding new warnings to also add fixes for them.
  • Constructor Details

  • Method Details

    • getFixesForJsError

      public com.google.common.collect.ImmutableList<SuggestedFix> getFixesForJsError(JSError error)
    • getFixForJsError

      public @Nullable SuggestedFix getFixForJsError(JSError error)
      Creates a SuggestedFix for the given error. Note that some errors have multiple fixes so getFixesForJsError should often be used instead of this.