public class JavaDiagnosticReader extends java.lang.Object implements java.util.Iterator<TestDiagnosticLine>
JavaDiagnosticReader
with the JAVA_COMMENT_CODEC
JavaDiagnosticReader
with a DIAGNOSTIC_FILE_CODEC
Modifier and Type | Class and Description |
---|---|
static interface |
JavaDiagnosticReader.DiagnosticCodec
Instances of DiagnosticCodec represent the various formats diagnostic strings can take
|
Modifier and Type | Field and Description |
---|---|
JavaDiagnosticReader.DiagnosticCodec |
codec |
static JavaDiagnosticReader.DiagnosticCodec |
DIAGNOSTIC_FILE_CODEC
Interprets a string that was written as a line in a Diagnostic File
|
static JavaDiagnosticReader.DiagnosticCodec |
JAVA_COMMENT_CODEC
Interprets a string that was written as a comment in a Java file
|
java.lang.String |
nextLine |
int |
nextLineNumber |
java.io.File |
toRead |
javax.tools.JavaFileObject |
toReadFileObject |
Constructor and Description |
---|
JavaDiagnosticReader(java.io.File toRead,
JavaDiagnosticReader.DiagnosticCodec codec) |
JavaDiagnosticReader(javax.tools.JavaFileObject toRead,
JavaDiagnosticReader.DiagnosticCodec codec) |
Modifier and Type | Method and Description |
---|---|
protected void |
advance() |
void |
close() |
boolean |
hasNext() |
TestDiagnosticLine |
next() |
static java.util.List<TestDiagnosticLine> |
readDiagnosticFile(java.io.File toRead,
boolean omitEmptyDiagnostics)
Reads diagnostic lines line-by-line from the input Diagnostic file.
|
static java.util.List<TestDiagnosticLine> |
readDiagnosticFileLines(java.lang.Iterable<? extends java.io.File> toRead,
boolean omitEmptyDiagnostics)
Reads diagnostic lines line-by-line from the input Diagnostic files.
|
static java.util.List<TestDiagnostic> |
readDiagnosticFiles(java.lang.Iterable<? extends java.io.File> toRead,
boolean omitEmptyDiagnostics)
Reads diagnostics line-by-line from the input Diagnostic files.
|
static java.util.List<TestDiagnosticLine> |
readDiagnosticLines(java.lang.Iterable<java.io.File> toRead,
boolean omitEmptyDiagnostics)
Reads diagnostic lines from the comments of a set of Java file.
|
static java.util.List<TestDiagnosticLine> |
readDiagnostics(java.io.File toRead,
boolean omitEmptyDiagnostics)
Reads diagnostic lines from the comments of the input Java file.
|
static java.util.List<TestDiagnosticLine> |
readDiagnostics(java.io.File toRead,
JavaDiagnosticReader.DiagnosticCodec codec,
boolean omitEmptyDiagnostics)
Reads the entire input file using the given codec and returns the resulting line.
|
static java.util.List<TestDiagnostic> |
readDiagnostics(java.lang.Iterable<java.io.File> toRead,
boolean omitEmptyDiagnostics)
Reads diagnostics from the comments of a set of Java file.
|
static java.util.List<TestDiagnosticLine> |
readDiagnosticsJfo(javax.tools.JavaFileObject toRead,
boolean omitEmptyDiagnostics)
Reads diagnostic lines from the comments of a set of Java file.
|
static java.util.List<TestDiagnosticLine> |
readExpectedDiagnosticLinesJfo(java.lang.Iterable<? extends javax.tools.JavaFileObject> toRead,
boolean omitEmptyDiagnostics)
Reads diagnostic lines from the comments of a set of Java file.
|
static java.util.List<TestDiagnostic> |
readExpectedDiagnosticsJfo(java.lang.Iterable<? extends javax.tools.JavaFileObject> toRead,
boolean omitEmptyDiagnostics)
Reads diagnostics from the comments of a set of Java file.
|
void |
remove() |
public static JavaDiagnosticReader.DiagnosticCodec JAVA_COMMENT_CODEC
public static JavaDiagnosticReader.DiagnosticCodec DIAGNOSTIC_FILE_CODEC
public final java.io.File toRead
public final javax.tools.JavaFileObject toReadFileObject
public final JavaDiagnosticReader.DiagnosticCodec codec
public java.lang.String nextLine
public int nextLineNumber
public JavaDiagnosticReader(java.io.File toRead, JavaDiagnosticReader.DiagnosticCodec codec)
public JavaDiagnosticReader(javax.tools.JavaFileObject toRead, JavaDiagnosticReader.DiagnosticCodec codec)
public static java.util.List<TestDiagnosticLine> readDiagnostics(java.io.File toRead, JavaDiagnosticReader.DiagnosticCodec codec, boolean omitEmptyDiagnostics)
toRead
- the file (Java or Diagnostics format) to readcodec
- a codec corresponding to the file type being readomitEmptyDiagnostics
- whether or not lines that do not contain any diagnostics should
be reported as empty TestDiagnosticLinespublic static java.util.List<TestDiagnosticLine> readDiagnostics(java.io.File toRead, boolean omitEmptyDiagnostics)
toRead
- a Java FileomitEmptyDiagnostics
- whether or not lines that do not contain any diagnostics should
be reported as empty TestDiagnosticLinespublic static java.util.List<TestDiagnosticLine> readDiagnosticLines(java.lang.Iterable<java.io.File> toRead, boolean omitEmptyDiagnostics)
toRead
- java files to read using the JAVA_COMMENT_CODEComitEmptyDiagnostics
- whether or not lines that do not contain any diagnostics should
be reported as empty TestDiagnosticLinespublic static java.util.List<TestDiagnostic> readDiagnostics(java.lang.Iterable<java.io.File> toRead, boolean omitEmptyDiagnostics)
toRead
- java files to read using the JAVA_COMMENT_CODEComitEmptyDiagnostics
- whether or not lines that do not contain any diagnostics should
be reported as empty TestDiagnosticLinespublic static java.util.List<TestDiagnosticLine> readDiagnosticsJfo(javax.tools.JavaFileObject toRead, boolean omitEmptyDiagnostics)
toRead
- the Java files to read using the JAVA_COMMENT_CODEComitEmptyDiagnostics
- whether or not lines that do not contain any diagnostics should
be reported as empty TestDiagnosticLinespublic static java.util.List<TestDiagnosticLine> readExpectedDiagnosticLinesJfo(java.lang.Iterable<? extends javax.tools.JavaFileObject> toRead, boolean omitEmptyDiagnostics)
toRead
- the Java files to read using the JAVA_COMMENT_CODEComitEmptyDiagnostics
- whether or not lines that do not contain any diagnostics should
be reported as empty TestDiagnosticLinespublic static java.util.List<TestDiagnostic> readExpectedDiagnosticsJfo(java.lang.Iterable<? extends javax.tools.JavaFileObject> toRead, boolean omitEmptyDiagnostics)
toRead
- the Java files to read using the JAVA_COMMENT_CODEComitEmptyDiagnostics
- whether or not lines that do not contain any diagnostics should
be reported as empty TestDiagnosticLinespublic static java.util.List<TestDiagnosticLine> readDiagnosticFile(java.io.File toRead, boolean omitEmptyDiagnostics)
toRead
- a Diagnostic FileomitEmptyDiagnostics
- whether or not lines that do not contain any diagnostics should
be reported as empty TestDiagnosticLinespublic static java.util.List<TestDiagnosticLine> readDiagnosticFileLines(java.lang.Iterable<? extends java.io.File> toRead, boolean omitEmptyDiagnostics)
toRead
- a set of Diagnostic FilesomitEmptyDiagnostics
- whether or not lines that do not contain any diagnostics should
be reported as empty TestDiagnosticLinespublic static java.util.List<TestDiagnostic> readDiagnosticFiles(java.lang.Iterable<? extends java.io.File> toRead, boolean omitEmptyDiagnostics)
toRead
- a set of Diagnostic FilesomitEmptyDiagnostics
- whether or not lines that do not contain any diagnostics should
be reported as empty TestDiagnosticLinespublic boolean hasNext()
hasNext
in interface java.util.Iterator<TestDiagnosticLine>
public void remove()
remove
in interface java.util.Iterator<TestDiagnosticLine>
public TestDiagnosticLine next()
next
in interface java.util.Iterator<TestDiagnosticLine>
protected void advance() throws java.io.IOException
java.io.IOException
public void close()