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 TypeMethodDescriptionint
Return current column number.int
Column (one-origin) of end of range; unknown/unspecified is -1.int
Line number (one-origin) of end of range; unknown/unspecified is -1.Normally same as getSystemId.int
Return current line number.int
Column (one-origin) of start of range; unknown/unspecified is -1.int
Line number (one-origin) of start of range; unknown/unspecified is -1.boolean
isRepl()
boolean
True if position is unlikely to change.void
void
setLine
(int lineno) void
setLine
(int lineno, int colno) void
void
setLocation
(SourceLocator location)
-
Field Details
-
filename
-
position
protected long position
-
-
Constructor Details
-
Simple
public Simple()
-
-
Method Details
-
getFileName
Description copied from interface:SourceLocator
Normally same as getSystemId.- Specified by:
getFileName
in interfaceSourceLocator
-
isRepl
public boolean isRepl() -
getPublicId
- Specified by:
getPublicId
in interfaceLocator
- Specified by:
getPublicId
in interfaceSourceLocator
- Specified by:
getPublicId
in interfaceSourceLocator
-
getSystemId
- Specified by:
getSystemId
in interfaceLocator
- Specified by:
getSystemId
in interfaceSourceLocator
- Specified by:
getSystemId
in interfaceSourceLocator
-
getLineNumber
public int getLineNumber()Description copied from interface:SourceLocator
Return current line number. Normally the same asgetStartLine()
. The "first" line is line 1; unknown is -1.- Specified by:
getLineNumber
in interfaceLocator
- Specified by:
getLineNumber
in interfaceSourceLocator
- Specified by:
getLineNumber
in interfaceSourceLocator
-
getColumnNumber
public int getColumnNumber()Description copied from interface:SourceLocator
Return current column number. Normally the same asgetStartColumn()
. The "first" column is column 1; unknown is -1.- Specified by:
getColumnNumber
in interfaceLocator
- Specified by:
getColumnNumber
in interfaceSourceLocator
- Specified by:
getColumnNumber
in interfaceSourceLocator
-
getStartLine
public int getStartLine()Description copied from interface:SourceLocator
Line number (one-origin) of start of range; unknown/unspecified is -1.- Specified by:
getStartLine
in interfaceSourceLocator
-
getStartColumn
public int getStartColumn()Description copied from interface:SourceLocator
Column (one-origin) of start of range; unknown/unspecified is -1.- Specified by:
getStartColumn
in interfaceSourceLocator
-
getEndLine
public int getEndLine()Description copied from interface:SourceLocator
Line number (one-origin) of end of range; unknown/unspecified is -1.- Specified by:
getEndLine
in interfaceSourceLocator
-
getEndColumn
public int getEndColumn()Description copied from interface:SourceLocator
Column (one-origin) of end of range; unknown/unspecified is -1.- Specified by:
getEndColumn
in interfaceSourceLocator
-
isStableSourceLocation
public boolean isStableSourceLocation()Description copied from interface:SourceLocator
True if position is unlikely to change. True for an expression but not an input file.- Specified by:
isStableSourceLocation
in interfaceSourceLocator
-
setFile
-
setLine
-
setLine
public void setLine(int lineno, int colno) -
setLine
public void setLine(int lineno) -
setLocation
-