Class 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 the SuggestedFix.Builder class and helper functions.
    • 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:
        toString in class java.lang.Object