Package gnu.text
Class SourceLocator.Simple
- java.lang.Object
-
- gnu.text.SourceLocator.Simple
-
- All Implemented Interfaces:
SourceLocator,javax.xml.transform.SourceLocator,org.xml.sax.Locator
- Direct Known Subclasses:
Declaration,SourceError,SourceMessages
- Enclosing interface:
- SourceLocator
public static class SourceLocator.Simple extends java.lang.Object implements SourceLocator
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface gnu.text.SourceLocator
SourceLocator.Simple
-
-
Constructor Summary
Constructors Constructor Description Simple()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intgetColumnNumber()Return current column number.intgetEndColumn()Column (one-origin) of end of range; unknown/unspecified is -1.intgetEndLine()Line number (one-origin) of end of range; unknown/unspecified is -1.java.lang.StringgetFileName()Normally same as getSystemId.intgetLineNumber()Return current line number.java.lang.StringgetPublicId()intgetStartColumn()Column (one-origin) of start of range; unknown/unspecified is -1.intgetStartLine()Line number (one-origin) of start of range; unknown/unspecified is -1.java.lang.StringgetSystemId()booleanisRepl()booleanisStableSourceLocation()True if position is unlikely to change.voidsetFile(java.lang.String filename)voidsetLine(int lineno)voidsetLine(int lineno, int colno)voidsetLine(java.lang.String filename, int line, int column)voidsetLocation(SourceLocator location)
-
-
-
Method Detail
-
getFileName
public java.lang.String getFileName()
Description copied from interface:SourceLocatorNormally same as getSystemId.- Specified by:
getFileNamein interfaceSourceLocator
-
isRepl
public boolean isRepl()
-
getPublicId
public java.lang.String getPublicId()
- Specified by:
getPublicIdin interfaceorg.xml.sax.Locator- Specified by:
getPublicIdin interfaceSourceLocator- Specified by:
getPublicIdin interfacejavax.xml.transform.SourceLocator
-
getSystemId
public java.lang.String getSystemId()
- Specified by:
getSystemIdin interfaceorg.xml.sax.Locator- Specified by:
getSystemIdin interfaceSourceLocator- Specified by:
getSystemIdin interfacejavax.xml.transform.SourceLocator
-
getLineNumber
public int getLineNumber()
Description copied from interface:SourceLocatorReturn current line number. Normally the same asgetStartLine(). The "first" line is line 1; unknown is -1.- Specified by:
getLineNumberin interfaceorg.xml.sax.Locator- Specified by:
getLineNumberin interfaceSourceLocator- Specified by:
getLineNumberin interfacejavax.xml.transform.SourceLocator
-
getColumnNumber
public int getColumnNumber()
Description copied from interface:SourceLocatorReturn current column number. Normally the same asgetStartColumn(). The "first" column is column 1; unknown is -1.- Specified by:
getColumnNumberin interfaceorg.xml.sax.Locator- Specified by:
getColumnNumberin interfaceSourceLocator- Specified by:
getColumnNumberin interfacejavax.xml.transform.SourceLocator
-
getStartLine
public int getStartLine()
Description copied from interface:SourceLocatorLine number (one-origin) of start of range; unknown/unspecified is -1.- Specified by:
getStartLinein interfaceSourceLocator
-
getStartColumn
public int getStartColumn()
Description copied from interface:SourceLocatorColumn (one-origin) of start of range; unknown/unspecified is -1.- Specified by:
getStartColumnin interfaceSourceLocator
-
getEndLine
public int getEndLine()
Description copied from interface:SourceLocatorLine number (one-origin) of end of range; unknown/unspecified is -1.- Specified by:
getEndLinein interfaceSourceLocator
-
getEndColumn
public int getEndColumn()
Description copied from interface:SourceLocatorColumn (one-origin) of end of range; unknown/unspecified is -1.- Specified by:
getEndColumnin interfaceSourceLocator
-
isStableSourceLocation
public boolean isStableSourceLocation()
Description copied from interface:SourceLocatorTrue if position is unlikely to change. True for an expression but not an input file.- Specified by:
isStableSourceLocationin interfaceSourceLocator
-
setFile
public void setFile(java.lang.String filename)
-
setLine
public void setLine(java.lang.String filename, int line, int column)
-
setLine
public void setLine(int lineno, int colno)
-
setLine
public void setLine(int lineno)
-
setLocation
public void setLocation(SourceLocator location)
-
-