Class JavaDiagnosticReader
java.lang.Object
org.checkerframework.framework.test.diagnostics.JavaDiagnosticReader
- All Implemented Interfaces:
- Closeable,- AutoCloseable,- Iterator<TestDiagnosticLine>
This class reads expected javac diagnostics from a single file. Its implementation is as an
 iterator over 
TestDiagnosticLine. However, clients should call the static methods: readJavaSourceFiles(java.lang.Iterable<? extends java.lang.Object>) reads diagnostics from multiple Java source files, and readDiagnosticFiles(java.lang.Iterable<? extends java.io.File>) reads diagnostics from multiple "diagnostic files".- 
Method SummaryModifier and TypeMethodDescriptionprotected voidadvance()voidclose()booleanhasNext()next()static List<TestDiagnostic>readDiagnosticFiles(Iterable<? extends File> files) Reads diagnostics line-by-line from the input diagnostic files.static List<TestDiagnostic>readJavaSourceFiles(Iterable<? extends Object> files) Returns all the diagnostics in any of the Java source files.voidremove()Methods inherited from class java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface java.util.IteratorforEachRemaining
- 
Method Details- 
readJavaSourceFilesReturns all the diagnostics in any of the Java source files.- Parameters:
- files- the Java files to read; each is a File or a JavaFileObject
- Returns:
- the TestDiagnostics from the input file
 
- 
readDiagnosticFilesReads diagnostics line-by-line from the input diagnostic files.- Parameters:
- files- a set of diagnostic files
- Returns:
- the TestDiagnosticLines from the input files
 
- 
hasNext- Specified by:
- hasNextin interface- Iterator<TestDiagnosticLine>
 
- 
removepublic void remove()- Specified by:
- removein interface- Iterator<TestDiagnosticLine>
 
- 
next- Specified by:
- nextin interface- Iterator<TestDiagnosticLine>
 
- 
advance@RequiresNonNull("reader") protected void advance(@UnknownInitialization JavaDiagnosticReader this) throws IOException - Throws:
- IOException
 
- 
closepublic void close()- Specified by:
- closein interface- AutoCloseable
- Specified by:
- closein interface- Closeable
 
 
-