Uses of Class
com.google.errorprone.fixes.SuggestedFix.Builder
Packages that use SuggestedFix.Builder
Package
Description
Checks added to the java compiler which detect common bug patterns.
Support code for providing automated corrections for defects we find.
-
Uses of SuggestedFix.Builder in com.google.errorprone.bugpatterns
Subclasses with type arguments of type SuggestedFix.Builder in com.google.errorprone.bugpatternsModifier and TypeClassDescriptionstatic classReplaces the operators when visiting the binary nodesMethods in com.google.errorprone.bugpatterns with parameters of type SuggestedFix.BuilderModifier and TypeMethodDescriptionstatic StringSameNameButDifferent.qualifyType(VisitorState state, SuggestedFix.Builder fix, com.sun.tools.javac.code.Symbol sym) Try to qualify the type, or return the full name.ShortCircuitBoolean.TreeScannerBinary.visitBinary(BinaryTree tree, SuggestedFix.Builder p) -
Uses of SuggestedFix.Builder in com.google.errorprone.fixes
Methods in com.google.errorprone.fixes that return SuggestedFix.BuilderModifier and TypeMethodDescriptionAdd an import statement as part of this SuggestedFix.SuggestedFix.Builder.addStaticImport(String importString) Add a static import statement as part of this SuggestedFix.static SuggestedFix.BuilderSuggestedFixes.addValuesToAnnotationArgument(AnnotationTree annotation, String parameterName, Collection<String> newValues, VisitorState state) Returns a fix that appendsnewValuesto theparameterNameargument forannotation, regardless of whether there is already an argument.static SuggestedFix.BuilderSuggestedFix.builder()SuggestedFix.Builder.merge(@Nullable SuggestedFix other) Merges all edits fromotherintothis.SuggestedFix.Builder.merge(@Nullable SuggestedFix.Builder other) Merges all edits fromotherintothis.SuggestedFix.Builder.postfixWith(Tree node, String postfix) SuggestedFix.Builder.prefixWith(Tree node, String prefix) SuggestedFix.Builder.removeImport(String importString) Remove an import statement as part of this SuggestedFix.SuggestedFix.Builder.removeStaticImport(String importString) Remove a static import statement as part of this SuggestedFix.Replace the characters from startPos, inclusive, until endPos, exclusive, with the given string.SuggestedFix.Builder.replace(Tree node, String replaceWith, int startPosAdjustment, int endPosAdjustment) Replace a tree node with a string, but adjust the start and end positions as well.SuggestedFix.Builder.setCoalescePolicy(Replacements.CoalescePolicy coalescePolicy) SuggestedFix.Builder.setShortDescription(String shortDescription) Sets a custom short description for this fix.SuggestedFix.Builder.swap(Tree node1, Tree node2, VisitorState state) SuggestedFix.toBuilder()static SuggestedFix.BuilderSuggestedFixes.updateAnnotationArgumentValues(AnnotationTree annotation, VisitorState state, String parameterName, Collection<String> newValues) Returns a fix that updatesnewValuesto theparameterNameargument forannotation, regardless of whether there is already an argument.static SuggestedFix.BuilderSuggestedFixes.updateAnnotationArgumentValues(AnnotationTree annotation, String parameterName, Collection<String> newValues) Deprecated.Methods in com.google.errorprone.fixes with parameters of type SuggestedFix.BuilderModifier and TypeMethodDescriptionstatic voidSuggestedFixes.addSuppressWarnings(SuggestedFix.Builder fixBuilder, VisitorState state, String warningToSuppress) ModifiesfixBuilderto either create a new@SuppressWarningselement on the closest suppressible node, or addwarningToSuppressto that node if there's already aSuppressWarningsannotation there.static voidSuggestedFixes.addSuppressWarnings(SuggestedFix.Builder fixBuilder, VisitorState state, String warningToSuppress, @Nullable String lineComment) ModifiesfixBuilderto either create a new@SuppressWarningselement on the closest suppressible node, or addwarningToSuppressto that node if there's already aSuppressWarningsannotation there.static voidSuggestedFixes.addSuppressWarnings(SuggestedFix.Builder fixBuilder, VisitorState state, String warningToSuppress, @Nullable String lineComment, boolean commentOnNewLine) ModifiesfixBuilderto either create a new@SuppressWarningselement on the closest suppressible node, or addwarningToSuppressto that node if there's already aSuppressWarningsannotation there.SuggestedFix.Builder.merge(@Nullable SuggestedFix.Builder other) Merges all edits fromotherintothis.static StringSuggestedFixes.prettyType(@Nullable VisitorState state, @Nullable SuggestedFix.Builder existingFix, com.sun.tools.javac.code.Type type) Pretty-prints a Type for use in fixes, qualifying any enclosed type names usingSuggestedFixes.qualifyType(VisitorState, SuggestedFix.Builder, Symbol)}.static voidSuggestedFixes.qualifyDocReference(SuggestedFix.Builder fix, DocTreePath docPath, VisitorState state) Fully qualifies a javadoc reference, e.g. for replacing{@link List}with{@link java.util.List}.static StringSuggestedFixes.qualifyStaticImport(String qualifiedName, SuggestedFix.Builder fix, VisitorState state) Provides a name to use for the (fully qualified) method provided inqualifiedName, trying to static import it if possible.static StringSuggestedFixes.qualifyType(VisitorState state, SuggestedFix.Builder fix, com.sun.tools.javac.code.Symbol sym) Returns a human-friendly name of the givenSymbolfor use in fixes.static StringSuggestedFixes.qualifyType(VisitorState state, SuggestedFix.Builder fix, String typeName) Returns a human-friendly name of the giventypeNamefor use in fixes.static StringSuggestedFixes.qualifyType(VisitorState state, SuggestedFix.Builder fix, TypeMirror type) Returns a human-friendly name of the given type for use in fixes.static voidSuggestedFixes.removeSuppressWarnings(SuggestedFix.Builder fixBuilder, VisitorState state, String warningToRemove) ModifiesfixBuilderto either remove awarningToRemovewarning from the closestSuppressWarningnode or remove the entireSuppressWarningnode ifwarningToRemoveis the only warning in that node.static voidSuggestedFixes.replaceDocTree(SuggestedFix.Builder fix, DocTreePath docPath, String replacement) Replaces the leaf doctree in the given path withreplacement. -
Uses of SuggestedFix.Builder in com.google.errorprone.refaster
Methods in com.google.errorprone.refaster with parameters of type SuggestedFix.BuilderModifier and TypeMethodDescriptionprotected static FixTemplate.addImports(Inliner inliner, SuggestedFix.Builder fix)
SuggestedFixes.updateAnnotationArgumentValues(AnnotationTree, VisitorState, String, Collection)instead