Package gnu.text
Class SourceLocator.Simple
java.lang.Object
gnu.text.SourceLocator.Simple
- All Implemented Interfaces:
SourceLocator,SourceLocator,Locator
- Direct Known Subclasses:
Declaration,SourceError,SourceMessages
- Enclosing interface:
SourceLocator
-
Nested Class Summary
Nested classes/interfaces inherited from interface gnu.text.SourceLocator
SourceLocator.Simple -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionintReturn current column number.intColumn (one-origin) of end of range; unknown/unspecified is -1.intLine number (one-origin) of end of range; unknown/unspecified is -1.Normally same as getSystemId.intReturn current line number.intColumn (one-origin) of start of range; unknown/unspecified is -1.intLine number (one-origin) of start of range; unknown/unspecified is -1.booleanisRepl()booleanTrue if position is unlikely to change.voidvoidsetLine(int lineno) voidsetLine(int lineno, int colno) voidvoidsetLocation(SourceLocator location)
-
Field Details
-
filename
-
position
protected long position
-
-
Constructor Details
-
Simple
public Simple()
-
-
Method Details
-
getFileName
Description copied from interface:SourceLocatorNormally same as getSystemId.- Specified by:
getFileNamein interfaceSourceLocator
-
isRepl
public boolean isRepl() -
getPublicId
- Specified by:
getPublicIdin interfaceLocator- Specified by:
getPublicIdin interfaceSourceLocator- Specified by:
getPublicIdin interfaceSourceLocator
-
getSystemId
- Specified by:
getSystemIdin interfaceLocator- Specified by:
getSystemIdin interfaceSourceLocator- Specified by:
getSystemIdin interfaceSourceLocator
-
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 interfaceLocator- Specified by:
getLineNumberin interfaceSourceLocator- Specified by:
getLineNumberin interfaceSourceLocator
-
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 interfaceLocator- Specified by:
getColumnNumberin interfaceSourceLocator- Specified by:
getColumnNumberin interfaceSourceLocator
-
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
-
setLine
-
setLine
public void setLine(int lineno, int colno) -
setLine
public void setLine(int lineno) -
setLocation
-