public static class SourceLocator.Simple extends java.lang.Object implements SourceLocator
SourceLocator.Simple
Modifier and Type | Field and Description |
---|---|
protected java.lang.String |
filename |
protected long |
position |
Constructor and Description |
---|
Simple() |
Modifier and Type | Method and Description |
---|---|
int |
getColumnNumber()
Return current column number.
|
int |
getEndColumn()
Column (one-origin) of end of range; unknown/unspecified is -1.
|
int |
getEndLine()
Line number (one-origin) of end of range; unknown/unspecified is -1.
|
java.lang.String |
getFileName()
Normally same as getSystemId.
|
int |
getLineNumber()
Return current line number.
|
java.lang.String |
getPublicId() |
int |
getStartColumn()
Column (one-origin) of start of range; unknown/unspecified is -1.
|
int |
getStartLine()
Line number (one-origin) of start of range; unknown/unspecified is -1.
|
java.lang.String |
getSystemId() |
boolean |
isRepl() |
boolean |
isStableSourceLocation()
True if position is unlikely to change.
|
void |
setFile(java.lang.String filename) |
void |
setLine(int lineno) |
void |
setLine(int lineno,
int colno) |
void |
setLine(java.lang.String filename,
int line,
int column) |
void |
setLocation(SourceLocator location) |
public java.lang.String getFileName()
SourceLocator
public boolean isRepl()
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 int getLineNumber()
SourceLocator
getStartLine()
.
The "first" line is line 1; unknown is -1.getLineNumber
in interface javax.xml.transform.SourceLocator
getLineNumber
in interface org.xml.sax.Locator
public int getColumnNumber()
SourceLocator
getStartColumn()
.
The "first" column is column 1; unknown is -1.getColumnNumber
in interface javax.xml.transform.SourceLocator
getColumnNumber
in interface org.xml.sax.Locator
public int getStartLine()
SourceLocator
public int getStartColumn()
SourceLocator
public int getEndLine()
SourceLocator
public int getEndColumn()
SourceLocator
public boolean isStableSourceLocation()
SourceLocator
public void setFile(java.lang.String filename)
public void setLine(java.lang.String filename, int line, int column)
public void setLine(int lineno, int colno)
public void setLine(int lineno)
public void setLocation(SourceLocator location)