public class SourceError extends java.lang.Object implements SourceLocator
Modifier and Type | Field and Description |
---|---|
java.lang.String |
code
If non-null, an error code, as might be specified by a standard.
|
int |
column
The column number of the error, with 1 being the left-most column.
|
java.lang.Throwable |
fakeException
Provides optional stack trace.
|
java.lang.String |
filename
The name or URL of the file containing the error.
|
int |
line
The (1-origin) location of the error.
|
java.lang.String |
message
The actual error message.
|
SourceError |
next
Used to chain to the "next" message.
|
char |
severity
The seriousness of the error - one of 'w' (for warning),
'e' (for error), or 'f' (for fatal error).
|
Constructor and Description |
---|
SourceError(char severity,
SourceLocator location,
java.lang.String message) |
SourceError(char severity,
java.lang.String filename,
int line,
int column,
java.lang.String message) |
SourceError(LineBufferedReader port,
char severity,
java.lang.String message)
Create a new SourceError using the current line/column from
a
LineBufferedReader . |
Modifier and Type | Method and Description |
---|---|
int |
getColumnNumber()
Return current column number.
|
java.lang.String |
getFileName()
Normally same as getSystemId.
|
int |
getLineNumber()
Return current line number.
|
java.lang.String |
getPublicId() |
java.lang.String |
getSystemId() |
boolean |
isStableSourceLocation()
True if position is unlikely to change.
|
void |
print(java.io.PrintWriter out) |
void |
println(java.io.PrintStream out) |
void |
println(java.io.PrintWriter out) |
java.lang.String |
toString()
Convert the error to a String.
|
public SourceError next
public char severity
public java.lang.String filename
public java.lang.String code
public int line
public int column
public java.lang.String message
public java.lang.Throwable fakeException
public SourceError(char severity, java.lang.String filename, int line, int column, java.lang.String message)
public SourceError(char severity, SourceLocator location, java.lang.String message)
public SourceError(LineBufferedReader port, char severity, java.lang.String message)
LineBufferedReader
.public java.lang.String toString()
toString
in class java.lang.Object
public void print(java.io.PrintWriter out)
public void println(java.io.PrintWriter out)
public void println(java.io.PrintStream out)
public int getLineNumber()
SourceLocator
getLineNumber
in interface javax.xml.transform.SourceLocator
getLineNumber
in interface org.xml.sax.Locator
public int getColumnNumber()
SourceLocator
getColumnNumber
in interface javax.xml.transform.SourceLocator
getColumnNumber
in interface org.xml.sax.Locator
public java.lang.String getPublicId()
getPublicId
in interface javax.xml.transform.SourceLocator
getPublicId
in interface org.xml.sax.Locator
public java.lang.String getSystemId()
getSystemId
in interface javax.xml.transform.SourceLocator
getSystemId
in interface org.xml.sax.Locator
public java.lang.String getFileName()
SourceLocator
public boolean isStableSourceLocation()
SourceLocator