Class SuggestedFix
- java.lang.Object
-
- com.google.javascript.refactoring.SuggestedFix
-
public final class SuggestedFix extends java.lang.ObjectObject representing the fixes to apply to the source code to create the refactoring CL. To create a class, use theSuggestedFix.Builderclass and helper functions.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classSuggestedFix.BuilderBuilder class forSuggestedFixthat contains helper functions to manipulate JS nodes.static classSuggestedFix.MatchedNodeInfoInformation 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.java.lang.StringgetDescription()SuggestedFix.MatchedNodeInfogetMatchedNodeInfo()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.StringtoString()
-
-
-
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
@Nullable public 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:
toStringin classjava.lang.Object
-
-