Uses of Annotation Interface
com.google.errorprone.annotations.CanIgnoreReturnValue
Packages that use CanIgnoreReturnValue
Package
Description
Checks added to the java compiler which detect common bug patterns.
Support code for providing automated corrections for defects we find.
A predicate DSL for matching javac AST nodes.
-
Uses of CanIgnoreReturnValue in com.google.errorprone
Methods in com.google.errorprone with annotations of type CanIgnoreReturnValueModifier and TypeMethodDescriptionBugCheckerRefactoringTestHelper.addModules(String... modules) CompilationTestHelper.addModules(String... modules) Deprecated.BugCheckerRefactoringTestHelper.ExpectOutput.addOutputLines(String path, String... output) CompilationTestHelper.addSourceFile(String path) Deprecated.CompilationTestHelper.addSourceLines(String path, String... lines) Adds a source file to the test compilation, from the string content of the file.BugCheckerRefactoringTestHelper.allowBreakingChanges()If set, fixes that produce output that doesn't compile are allowed.CompilationTestHelper.expectErrorMessage(String key, Predicate<? super String> matcher) Expects an error message matchingmatcherat the line below a comment matching the key.CompilationTestHelper.expectNoDiagnostics()Tells the compilation helper to expect that no diagnostics will be generated, even if the source file contains bug markers.CompilationTestHelper.expectResult(com.sun.tools.javac.main.Main.Result result) Tells the compilation helper to expect a specific result from the compilation, e.g. success or failure.BugCheckerRefactoringTestHelper.ExpectOutput.expectUnchanged()CompilationTestHelper.matchAllDiagnostics()By default, the compilation helper will only inspect diagnostics generated by the check being tested.Given a String custom flag in the format"-XepOpt:FlagName=Value", places the flag in this builder's dictionary, e.g.Puts a key-value pair directly in this builder's dictionary.Sets custom command-line arguments for the compilation.Sets custom command-line arguments for the compilation.BugCheckerRefactoringTestHelper.setFixChooser(BugCheckerRefactoringTestHelper.FixChooser chooser) BugCheckerRefactoringTestHelper.setImportOrder(String importOrder) CompilationTestHelper.withClasspath(Class<?>... classes) Sets the classpath for the test compilation, overriding the default of using the runtime classpath of the test execution. -
Uses of CanIgnoreReturnValue in com.google.errorprone.apply
Methods in com.google.errorprone.apply with annotations of type CanIgnoreReturnValueModifier and TypeMethodDescriptionbooleanAdd an import to the list of imports.booleanImportStatements.addAll(Collection<String> importsToAdd) Add all imports in a collection to this list of imports.ImportOrganizer.OrganizedImports.addGroups(Map<K, ? extends Collection<ImportOrganizer.Import>> groups, Iterable<K> keys) Add groups of already sorted imports.booleanRemove an import from the list of imports.booleanImportStatements.removeAll(Collection<String> importsToRemove) Removes all imports in a collection to this list of imports. -
Uses of CanIgnoreReturnValue in com.google.errorprone.bugpatterns
Methods in com.google.errorprone.bugpatterns with annotations of type CanIgnoreReturnValueModifier and TypeMethodDescriptionfinal StronglyType.BuilderStronglyType.Builder.addType(com.sun.tools.javac.code.Type type) Add a type that can be replaced with a stronger type. -
Uses of CanIgnoreReturnValue in com.google.errorprone.bugpatterns.checkreturnvalue
Methods in com.google.errorprone.bugpatterns.checkreturnvalue with annotations of type CanIgnoreReturnValueModifier and TypeMethodDescriptionResultUsePolicyEvaluator.Builder.addRule(ResultUseRule<C, S> rule) Adds the givenrule.ResultUsePolicyEvaluator.Builder.addRules(ResultUseRule<C, S>... rules) Adds all the givenrules.ResultUsePolicyEvaluator.Builder.addRules(Iterable<? extends ResultUseRule<C, S>> rules) Adds all the givenrules. -
Uses of CanIgnoreReturnValue in com.google.errorprone.bugpatterns.threadsafety
Methods in com.google.errorprone.bugpatterns.threadsafety with annotations of type CanIgnoreReturnValueModifier and TypeMethodDescriptionThreadSafetyKnownTypes.MapBuilder.addAll(com.google.common.collect.ImmutableMap<String, AnnotationInfo> map) ThreadSafetyKnownTypes.MapBuilder.addClasses(Set<Class<?>> clazzs) ThreadSafetyKnownTypes.MapBuilder.addStrings(List<String> classNames) -
Uses of CanIgnoreReturnValue in com.google.errorprone.dataflow
Methods in com.google.errorprone.dataflow with annotations of type CanIgnoreReturnValueModifier and TypeMethodDescriptionAccessPathStore.Builder.setInformation(AccessPath aPath, V value) -
Uses of CanIgnoreReturnValue in com.google.errorprone.fixes
Methods in com.google.errorprone.fixes with annotations of type CanIgnoreReturnValueModifier and TypeMethodDescriptionReplacements.add(Replacement replacement) Replacements.add(Replacement replacement, Replacements.CoalescePolicy coalescePolicy) Add an import statement as part of this SuggestedFix.BranchedSuggestedFixes.Builder.addOption(SuggestedFix fix) SuggestedFix.Builder.addStaticImport(String importString) Add a static import statement as part of this SuggestedFix.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.BranchedSuggestedFixes.Builder.startWith(SuggestedFix fix) SuggestedFix.Builder.swap(Tree node1, Tree node2, VisitorState state) BranchedSuggestedFixes.Builder.then() -
Uses of CanIgnoreReturnValue in com.google.errorprone.matchers
Methods in com.google.errorprone.matchers with annotations of type CanIgnoreReturnValueModifier and TypeMethodDescriptionDescription.Builder.addAllFixes(List<? extends Fix> fixes) Add each fix in order.Adds a suggested fix for thisDescription.Deprecated.prefer referring to empty fixes usingSuggestedFix.emptyFix().Description.Builder.overrideSeverity(BugPattern.SeverityLevel severity) Description.Builder.setLinkUrl(String linkUrl) Set a custom link URL.Description.Builder.setMessage(String message) Set a custom error message for thisDescription. -
Uses of CanIgnoreReturnValue in com.google.errorprone.refaster
Methods in com.google.errorprone.refaster with annotations of type CanIgnoreReturnValueModifier and TypeMethodDescriptionstatic <T> TRefaster.anyOf(T... expressions) Indicates that Refaster should attempt to match a target expression against each of the specified template expressions, in order, and succeed at the first match.@Nullable ObjectBindings.put(Bindings.Key<?> key, Object value) <V> VBindings.putBinding(Bindings.Key<V> key, V value) <V> VUnifier.putBinding(Bindings.Key<V> key, V value) -
Uses of CanIgnoreReturnValue in com.google.errorprone.scanner
Methods in com.google.errorprone.scanner with annotations of type CanIgnoreReturnValue
BugCheckerRefactoringTestHelper.ExpectOutput.addOutputLines(String, String...).