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
public abstract class SourcePosition<T> extends java.lang.ObjectRepresents a position in some piece of source code, with an associated item of type T found at that position.
-
-
Constructor Summary
Constructors Constructor Description SourcePosition()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intgetEndLine()Returns the ending line number of this position.TgetItem()Returns the item found at this source position.intgetPositionOnEndLine()Returns the character position on the ending line.intgetPositionOnStartLine()Returns the character position on the starting line.intgetStartLine()Returns the starting line number of this position.voidsetItem(T item)Sets the item that this source position references.voidsetPositionInformation(int startLineno, int startCharno, int endLineno, int endCharno)Sets the position information contained in this source position.
-
-
-
Method Detail
-
setItem
public void setItem(T item)
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
public T 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.
-
-