Uses of Class
com.google.errorprone.annotations.CanIgnoreReturnValue
Package | Description |
---|---|
com.google.errorprone | |
com.google.errorprone.apply | |
com.google.errorprone.bugpatterns |
Checks added to the java compiler which detect common bug patterns.
|
com.google.errorprone.bugpatterns.checkreturnvalue | |
com.google.errorprone.bugpatterns.threadsafety | |
com.google.errorprone.dataflow | |
com.google.errorprone.fixes |
Support code for providing automated corrections for defects we find.
|
com.google.errorprone.matchers |
A predicate DSL for matching javac AST nodes.
|
com.google.errorprone.refaster |
-
Uses of CanIgnoreReturnValue in com.google.errorprone
Methods in com.google.errorprone with annotations of type CanIgnoreReturnValue Modifier and Type Method Description BugCheckerRefactoringTestHelper
BugCheckerRefactoringTestHelper. addModules(String... modules)
CompilationTestHelper
CompilationTestHelper. addModules(String... modules)
CompilationTestHelper
CompilationTestHelper. addSourceFile(String path)
Adds a source file to the test compilation, from an existing resource file.CompilationTestHelper
CompilationTestHelper. addSourceLines(String path, String... lines)
Adds a source file to the test compilation, from the string content of the file.BugCheckerRefactoringTestHelper
BugCheckerRefactoringTestHelper. allowBreakingChanges()
If set, fixes that produce output that doesn't compile are allowed.CompilationTestHelper
CompilationTestHelper. expectErrorMessage(String key, com.google.common.base.Predicate<? super String> matcher)
Expects an error message matchingmatcher
at the line below a comment matching the key.CompilationTestHelper
CompilationTestHelper. expectNoDiagnostics()
Tells the compilation helper to expect that no diagnostics will be generated, even if the source file contains bug markers.CompilationTestHelper
CompilationTestHelper. expectResult(com.sun.tools.javac.main.Main.Result result)
Tells the compilation helper to expect a specific result from the compilation, e.g.CompilationTestHelper
CompilationTestHelper. matchAllDiagnostics()
By default, the compilation helper will only inspect diagnostics generated by the check being tested.ErrorProneFlags.Builder
ErrorProneFlags.Builder. parseFlag(String flag)
Given a String custom flag in the format"-XepOpt:FlagName=Value"
, places the flag in this builder's dictionary, e.g.ErrorProneFlags.Builder
ErrorProneFlags.Builder. putFlag(String key, String value)
Puts a key-value pair directly in this builder's dictionary.BugCheckerRefactoringTestHelper
BugCheckerRefactoringTestHelper. setArgs(com.google.common.collect.ImmutableList<String> args)
BugCheckerRefactoringTestHelper
BugCheckerRefactoringTestHelper. setArgs(String... args)
CompilationTestHelper
CompilationTestHelper. setArgs(String... args)
Sets custom command-line arguments for the compilation.CompilationTestHelper
CompilationTestHelper. setArgs(List<String> args)
Sets custom command-line arguments for the compilation.BugCheckerRefactoringTestHelper
BugCheckerRefactoringTestHelper. setFixChooser(BugCheckerRefactoringTestHelper.FixChooser chooser)
BugCheckerRefactoringTestHelper
BugCheckerRefactoringTestHelper. setImportOrder(String importOrder)
CompilationTestHelper
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 CanIgnoreReturnValue Modifier and Type Method Description <K> ImportOrganizer.OrganizedImports
ImportOrganizer.OrganizedImports. addGroups(Map<K,? extends Collection<ImportOrganizer.Import>> groups, Iterable<K> keys)
Add groups of already sorted imports. -
Uses of CanIgnoreReturnValue in com.google.errorprone.bugpatterns
Methods in com.google.errorprone.bugpatterns with annotations of type CanIgnoreReturnValue Modifier and Type Method Description StronglyType.Builder
StronglyType.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 CanIgnoreReturnValue Modifier and Type Method Description ResultUsePolicyEvaluator.Builder
ResultUsePolicyEvaluator.Builder. addRule(ResultUseRule rule)
Adds the givenrule
.ResultUsePolicyEvaluator.Builder
ResultUsePolicyEvaluator.Builder. addRules(ResultUseRule... rules)
Adds all the givenrules
.ResultUsePolicyEvaluator.Builder
ResultUsePolicyEvaluator.Builder. addRules(Iterable<? extends ResultUseRule> 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 CanIgnoreReturnValue Modifier and Type Method Description ThreadSafety.Builder
ThreadSafety.Builder. acceptedAnnotations(com.google.common.collect.ImmutableSet<String> acceptedAnnotations)
ThreadSafety.Builder
ThreadSafety.Builder. acceptedAnnotations(Set<String> acceptedAnnotations)
Annotations that do *not* cause a class to be tested, but which are treated as valid annotations to pass the test; for example, if @ThreadSafe is the marker annotation, @Immutable would be included in this list, as an immutable class is by definition thread-safe.ThreadSafety.Builder
ThreadSafety.Builder. containerOfAnnotation(Class<? extends Annotation> containerOfAnnotation)
An annotation which marks a generic parameter as a container type.ThreadSafety.Builder
ThreadSafety.Builder. knownTypes(ThreadSafety.KnownTypes knownTypes)
Information about known types and whether they're known to be safe or unsafe.ThreadSafety.Builder
ThreadSafety.Builder. markerAnnotations(com.google.common.collect.ImmutableSet<String> markerAnnotations)
ThreadSafety.Builder
ThreadSafety.Builder. markerAnnotations(Set<String> markerAnnotations)
Annotations that will cause a class to be tested with thisThreadSafety
instance; for example, when testing a class for immutability, this should be @Immutable.ThreadSafety.Builder
ThreadSafety.Builder. setPurpose(ThreadSafety.Purpose purpose)
SeeThreadSafety.Purpose
.ThreadSafety.Builder
ThreadSafety.Builder. suppressAnnotation(Class<? extends Annotation> suppressAnnotation)
An annotation which, when found on a class, should suppress the testThreadSafety.Builder
ThreadSafety.Builder. typeParameterAnnotation(Class<? extends Annotation> typeParameterAnnotation)
An annotation which, when found on a type parameter, indicates that the type parameter may only be instantiated with thread-safe types. -
Uses of CanIgnoreReturnValue in com.google.errorprone.dataflow
Methods in com.google.errorprone.dataflow with annotations of type CanIgnoreReturnValue Modifier and Type Method Description AccessPathStore.Builder<V>
AccessPathStore.Builder. setInformation(AccessPath aPath, V value)
-
Uses of CanIgnoreReturnValue in com.google.errorprone.fixes
Methods in com.google.errorprone.fixes with annotations of type CanIgnoreReturnValue Modifier and Type Method Description Replacements
Replacements. add(Replacement replacement)
Replacements
Replacements. add(Replacement replacement, Replacements.CoalescePolicy coalescePolicy)
SuggestedFix.Builder
SuggestedFix.Builder. addImport(String importString)
Add an import statement as part of this SuggestedFix.BranchedSuggestedFixes.Builder
BranchedSuggestedFixes.Builder. addOption(SuggestedFix fix)
SuggestedFix.Builder
SuggestedFix.Builder. addStaticImport(String importString)
Add a static import statement as part of this SuggestedFix.SuggestedFix.Builder
SuggestedFix.Builder. delete(com.sun.source.tree.Tree node)
SuggestedFix.Builder
SuggestedFix.Builder. merge(SuggestedFix other)
Merges all edits fromother
intothis
.SuggestedFix.Builder
SuggestedFix.Builder. merge(SuggestedFix.Builder other)
Merges all edits fromother
intothis
.SuggestedFix.Builder
SuggestedFix.Builder. postfixWith(com.sun.source.tree.Tree node, String postfix)
SuggestedFix.Builder
SuggestedFix.Builder. prefixWith(com.sun.source.tree.Tree node, String prefix)
SuggestedFix.Builder
SuggestedFix.Builder. removeImport(String importString)
Remove an import statement as part of this SuggestedFix.SuggestedFix.Builder
SuggestedFix.Builder. removeStaticImport(String importString)
Remove a static import statement as part of this SuggestedFix.SuggestedFix.Builder
SuggestedFix.Builder. replace(int startPos, int endPos, String replaceWith)
Replace the characters from startPos, inclusive, until endPos, exclusive, with the given string.SuggestedFix.Builder
SuggestedFix.Builder. replace(com.sun.source.tree.Tree node, String replaceWith)
SuggestedFix.Builder
SuggestedFix.Builder. replace(com.sun.source.tree.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
SuggestedFix.Builder. setShortDescription(String shortDescription)
Sets a custom short description for this fix.BranchedSuggestedFixes.Builder
BranchedSuggestedFixes.Builder. startWith(SuggestedFix fix)
SuggestedFix.Builder
SuggestedFix.Builder. swap(com.sun.source.tree.Tree node1, com.sun.source.tree.Tree node2)
BranchedSuggestedFixes.Builder
BranchedSuggestedFixes.Builder. then()
-
Uses of CanIgnoreReturnValue in com.google.errorprone.matchers
Methods in com.google.errorprone.matchers with annotations of type CanIgnoreReturnValue Modifier and Type Method Description Description.Builder
Description.Builder. addAllFixes(List<? extends Fix> fixes)
Add each fix in order.Description.Builder
Description.Builder. addFix(Fix fix)
Adds a suggested fix for thisDescription
.Description.Builder
Description.Builder. addFix(Optional<? extends Fix> fix)
Deprecated.Description.Builder
Description.Builder. setLinkUrl(String linkUrl)
Set a custom link URL.Description.Builder
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 CanIgnoreReturnValue Modifier and Type Method Description static <T> T
Refaster. 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.Object
Bindings. put(Bindings.Key<?> key, Object value)
SuggestedFix.emptyFix()
.