public final class ApplySuggestedFixes
extends java.lang.Object
| Modifier and Type | Method and Description |
|---|---|
static java.lang.String |
applyCodeReplacements(java.lang.Iterable<CodeReplacement> replacements,
java.lang.String code)
Applies the provided set of code replacements to the code and returns the transformed code.
|
static java.util.Map<java.lang.String,java.lang.String> |
applySuggestedFixesToCode(java.lang.Iterable<SuggestedFix> fixes,
java.util.Map<java.lang.String,java.lang.String> filenameToCodeMap)
Applies the provided set of suggested fixes to the provided code and returns the new code.
|
static void |
applySuggestedFixesToFiles(java.lang.Iterable<SuggestedFix> fixes)
Applies the provided set of suggested fixes to the files listed in the suggested fixes.
|
public static void applySuggestedFixesToFiles(java.lang.Iterable<SuggestedFix> fixes) throws java.io.IOException
java.io.IOExceptionpublic static java.util.Map<java.lang.String,java.lang.String> applySuggestedFixesToCode(java.lang.Iterable<SuggestedFix> fixes, java.util.Map<java.lang.String,java.lang.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 java.lang.String applyCodeReplacements(java.lang.Iterable<CodeReplacement> replacements, java.lang.String code)
Copyright © 2009-2017 Google. All Rights Reserved.