Package com.google.javascript.rhino
Class SourcePosition<T>
java.lang.Object
com.google.javascript.rhino.SourcePosition<T>
- Direct Known Subclasses:
JSDocInfo.NamePosition
,JSDocInfo.StringPosition
,JSDocInfo.TypePosition
Represents a position in some piece of source code, with an associated
item of type T found at that position.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionint
Returns the ending line number of this position.getItem()
Returns the item found at this source position.int
Returns the character position on the ending line.int
Returns the character position on the starting line.int
Returns the starting line number of this position.void
Sets the item that this source position references.void
setPositionInformation
(int startLineno, int startCharno, int endLineno, int endCharno) Sets the position information contained in this source position.
-
Constructor Details
-
SourcePosition
public SourcePosition()
-
-
Method Details
-
setItem
Sets the item that this source position references. -
setPositionInformation
public void setPositionInformation(int startLineno, int startCharno, int endLineno, int endCharno) Sets the position information contained in this source position. -
getItem
Returns the item found at this source position. -
getStartLine
public int getStartLine()Returns the starting line number of this position. -
getPositionOnStartLine
public int getPositionOnStartLine()Returns the character position on the starting line. -
getEndLine
public int getEndLine()Returns the ending line number of this position. -
getPositionOnEndLine
public int getPositionOnEndLine()Returns the character position on the ending line.
-