Class SuggestedFix
- java.lang.Object
-
- com.google.javascript.refactoring.SuggestedFix
-
public final class SuggestedFix extends java.lang.Object
Object representing the fixes to apply to the source code to create the refactoring CL. To create a class, use theSuggestedFix.Builder
class and helper functions.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
SuggestedFix.Builder
Builder class forSuggestedFix
that contains helper functions to manipulate JS nodes.static class
SuggestedFix.MatchedNodeInfo
Information about the node that was matched for the suggested fix.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description com.google.common.collect.ImmutableList<SuggestedFix>
getAlternatives()
Get all possible fixes for this problem, including this fix.@Nullable java.lang.String
getDescription()
SuggestedFix.MatchedNodeInfo
getMatchedNodeInfo()
Returns information about the original JS Compiler Node that caused this SuggestedFix to be constructed.com.google.common.collect.ImmutableList<SuggestedFix>
getNonDefaultAlternatives()
Get all alternative fixes, excluding this fix.com.google.common.collect.SetMultimap<java.lang.String,CodeReplacement>
getReplacements()
Returns a multimap from filename to all the replacements that should be applied for this given fix.java.lang.String
toString()
-
-
-
Method Detail
-
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<java.lang.String,CodeReplacement> getReplacements()
Returns a multimap from filename to all the replacements that should be applied for this given fix.
-
getDescription
public @Nullable java.lang.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 java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-