public final class ApplySuggestedFixes extends Object
Modifier and Type | Method and Description |
---|---|
static String |
applyCodeReplacements(Iterable<CodeReplacement> replacements,
String code)
Applies the provided set of code replacements to the code and returns the transformed code.
|
static Map<String,String> |
applySuggestedFixesToCode(Iterable<SuggestedFix> fixes,
Map<String,String> filenameToCodeMap)
Applies the provided set of suggested fixes to the provided code and returns the new code.
|
static void |
applySuggestedFixesToFiles(Iterable<SuggestedFix> fixes)
Applies the provided set of suggested fixes to the files listed in the suggested fixes.
|
public static void applySuggestedFixesToFiles(Iterable<SuggestedFix> fixes) throws IOException
IOException
public static Map<String,String> applySuggestedFixesToCode(Iterable<SuggestedFix> fixes, Map<String,String> filenameToCodeMap)
filenameToCodeMap
must contain all the files that the provided fixes apply to.
The fixes can be provided in any order, but they may not have any overlapping modifications
for the same file.
This function will return new code only for the files that have been modified.public static String applyCodeReplacements(Iterable<CodeReplacement> replacements, String code)
Copyright © 2009-2017 Google. All Rights Reserved.