Class ErrorToFixMapper
- java.lang.Object
-
- com.google.javascript.refactoring.ErrorToFixMapper
-
public final class ErrorToFixMapper extends java.lang.Object
Maps aJSError
to a list ofSuggestedFix
es, 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 Summary
Constructors Constructor Description ErrorToFixMapper(AbstractCompiler compiler)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description com.google.common.collect.ImmutableList<SuggestedFix>
getFixesForJsError(JSError error)
@Nullable SuggestedFix
getFixForJsError(JSError error)
Creates a SuggestedFix for the given error.
-
-
-
Constructor Detail
-
ErrorToFixMapper
public ErrorToFixMapper(AbstractCompiler compiler)
-
-
Method Detail
-
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.
-
-