Index

A B C D E F G M N S T V W 
All Classes and Interfaces|All Packages

A

addInput(String) - Method in class com.google.errorprone.BugCheckerRefactoringTestHelper
 
addInputLines(String, String...) - Method in class com.google.errorprone.BugCheckerRefactoringTestHelper
 
addModules(String...) - Method in class com.google.errorprone.BugCheckerRefactoringTestHelper
 
addModules(String...) - Method in class com.google.errorprone.CompilationTestHelper
 
addOutput(String) - Method in class com.google.errorprone.BugCheckerRefactoringTestHelper.ExpectOutput
 
addOutputLines(String, String...) - Method in class com.google.errorprone.BugCheckerRefactoringTestHelper.ExpectOutput
 
addSourceFile(String) - Method in class com.google.errorprone.CompilationTestHelper
Adds a source file to the test compilation, from an existing resource file.
addSourceLines(String, String...) - Method in class com.google.errorprone.CompilationTestHelper
Adds a source file to the test compilation, from the string content of the file.
allowBreakingChanges() - Method in class com.google.errorprone.BugCheckerRefactoringTestHelper
If set, fixes that produce output that doesn't compile are allowed.
assertHasDiagnosticOnAllMatchingLines(JavaFileObject, DiagnosticTestHelper.LookForCheckNameInDiagnostic) - Method in class com.google.errorprone.DiagnosticTestHelper
Asserts that the diagnostics contain a diagnostic on each line of the source file that matches our bug marker pattern.
AST_MATCH - Enum constant in enum com.google.errorprone.BugCheckerRefactoringTestHelper.TestMode
 

B

BugCheckerRefactoringTestHelper - Class in com.google.errorprone
Compare a file transformed as suggested by BugChecker to an expected source.
BugCheckerRefactoringTestHelper.ExpectOutput - Class in com.google.errorprone
To assert the proper .addInput().addOutput() chain.
BugCheckerRefactoringTestHelper.FixChooser - Interface in com.google.errorprone
For checks that provide multiple possible fixes, chooses the one that will be applied for the test.
BugCheckerRefactoringTestHelper.FixChoosers - Enum in com.google.errorprone
Predefined FixChoosers for selecting a fix by its position in the list
BugCheckerRefactoringTestHelper.TestMode - Enum in com.google.errorprone
Test mode for matching refactored source against expected source.

C

choose(List<Fix>) - Method in interface com.google.errorprone.BugCheckerRefactoringTestHelper.FixChooser
 
clearDiagnostics() - Method in class com.google.errorprone.DiagnosticTestHelper
 
collector - Variable in class com.google.errorprone.DiagnosticTestHelper
 
com.google.errorprone - package com.google.errorprone
 
CompilationTestHelper - Class in com.google.errorprone
Helps test Error Prone bug checkers and compilations.

D

describe() - Method in class com.google.errorprone.DiagnosticTestHelper
 
diagnosticLineAndColumn(long, long) - Static method in class com.google.errorprone.DiagnosticTestHelper
 
diagnosticMessage(Matcher<String>) - Static method in class com.google.errorprone.DiagnosticTestHelper
 
diagnosticOnLine(URI, long) - Static method in class com.google.errorprone.DiagnosticTestHelper
 
diagnosticOnLine(URI, long, Predicate<? super String>) - Static method in class com.google.errorprone.DiagnosticTestHelper
 
DiagnosticTestHelper - Class in com.google.errorprone
Utility class for tests which need to assert on the diagnostics produced during compilation.
DiagnosticTestHelper() - Constructor for class com.google.errorprone.DiagnosticTestHelper
Construct a DiagnosticTestHelper not associated with a specific check.
DiagnosticTestHelper(String) - Constructor for class com.google.errorprone.DiagnosticTestHelper
Construct a DiagnosticTestHelper for a check with the given name.
doTest() - Method in class com.google.errorprone.BugCheckerRefactoringTestHelper
 
doTest() - Method in class com.google.errorprone.CompilationTestHelper
Performs a compilation and checks that the diagnostics and result match the expectations.
doTest(BugCheckerRefactoringTestHelper.TestMode) - Method in class com.google.errorprone.BugCheckerRefactoringTestHelper
 

E

expectErrorMessage(String, Predicate<? super String>) - Method in class com.google.errorprone.CompilationTestHelper
Expects an error message matching matcher at the line below a comment matching the key.
expectErrorMessage(String, Predicate<? super String>) - Method in class com.google.errorprone.DiagnosticTestHelper
Expects an error message matching matcher at the line below a comment matching the key.
expectNoDiagnostics() - Method in class com.google.errorprone.CompilationTestHelper
Tells the compilation helper to expect that no diagnostics will be generated, even if the source file contains bug markers.
expectResult(Main.Result) - Method in class com.google.errorprone.CompilationTestHelper
Tells the compilation helper to expect a specific result from the compilation, e.g.
expectUnchanged() - Method in class com.google.errorprone.BugCheckerRefactoringTestHelper.ExpectOutput
 

F

FileManagers - Class in com.google.errorprone
Manages JavacFileManagers for use in Error Prone's test.
FileObjects - Class in com.google.errorprone
Factories for in-memory JavaFileObjects, for testing.
FIRST - Enum constant in enum com.google.errorprone.BugCheckerRefactoringTestHelper.FixChoosers
 
forResource(Class<?>, String) - Static method in class com.google.errorprone.FileObjects
Loads a resource of the provided class into a JavaFileObject.
forResources(Class<?>, String...) - Static method in class com.google.errorprone.FileObjects
Loads resources of the provided class into JavaFileObjects.
forSourceLines(String, String...) - Static method in class com.google.errorprone.FileObjects
Creates a JavaFileObject with the given name and content.
FOURTH - Enum constant in enum com.google.errorprone.BugCheckerRefactoringTestHelper.FixChoosers
 

G

getDiagnostics() - Method in class com.google.errorprone.DiagnosticTestHelper
 
getUnusedLookupKeys() - Method in class com.google.errorprone.DiagnosticTestHelper
Returns the lookup keys that weren't used.

M

matchAllDiagnostics() - Method in class com.google.errorprone.CompilationTestHelper
By default, the compilation helper will only inspect diagnostics generated by the check being tested.

N

newInstance(BugChecker, Class<?>) - Static method in class com.google.errorprone.BugCheckerRefactoringTestHelper
newInstance(ScannerSupplier, Class<?>) - Static method in class com.google.errorprone.BugCheckerRefactoringTestHelper
Returns a new CompilationTestHelper.
newInstance(ScannerSupplier, Class<?>) - Static method in class com.google.errorprone.CompilationTestHelper
Returns a new CompilationTestHelper.
newInstance(Class<? extends BugChecker>, Class<?>) - Static method in class com.google.errorprone.BugCheckerRefactoringTestHelper
 
newInstance(Class<? extends BugChecker>, Class<?>) - Static method in class com.google.errorprone.CompilationTestHelper
Returns a new CompilationTestHelper.

S

SECOND - Enum constant in enum com.google.errorprone.BugCheckerRefactoringTestHelper.FixChoosers
 
setArgs(ImmutableList<String>) - Method in class com.google.errorprone.BugCheckerRefactoringTestHelper
 
setArgs(String...) - Method in class com.google.errorprone.BugCheckerRefactoringTestHelper
 
setArgs(String...) - Method in class com.google.errorprone.CompilationTestHelper
Sets custom command-line arguments for the compilation.
setArgs(List<String>) - Method in class com.google.errorprone.CompilationTestHelper
Sets custom command-line arguments for the compilation.
setFixChooser(BugCheckerRefactoringTestHelper.FixChooser) - Method in class com.google.errorprone.BugCheckerRefactoringTestHelper
 
setImportOrder(String) - Method in class com.google.errorprone.BugCheckerRefactoringTestHelper
 
suggestsRemovalOfLine(URI, int) - Static method in class com.google.errorprone.DiagnosticTestHelper
 

T

testFileManager() - Static method in class com.google.errorprone.FileManagers
Returns a JavacFileManager for use in compiler-based tests.
TEXT_MATCH - Enum constant in enum com.google.errorprone.BugCheckerRefactoringTestHelper.TestMode
 
THIRD - Enum constant in enum com.google.errorprone.BugCheckerRefactoringTestHelper.FixChoosers
 

V

valueOf(String) - Static method in enum com.google.errorprone.BugCheckerRefactoringTestHelper.FixChoosers
Returns the enum constant of this type with the specified name.
valueOf(String) - Static method in enum com.google.errorprone.BugCheckerRefactoringTestHelper.TestMode
Returns the enum constant of this type with the specified name.
values() - Static method in enum com.google.errorprone.BugCheckerRefactoringTestHelper.FixChoosers
Returns an array containing the constants of this enum type, in the order they are declared.
values() - Static method in enum com.google.errorprone.BugCheckerRefactoringTestHelper.TestMode
Returns an array containing the constants of this enum type, in the order they are declared.

W

withClasspath(Class<?>...) - Method in class com.google.errorprone.CompilationTestHelper
Sets the classpath for the test compilation, overriding the default of using the runtime classpath of the test execution.
A B C D E F G M N S T V W 
All Classes and Interfaces|All Packages