com.android.tools.lint.detector.api
Class DefaultPosition

java.lang.Object
  extended by com.android.tools.lint.detector.api.Position
      extended by com.android.tools.lint.detector.api.DefaultPosition

@Beta
public class DefaultPosition
extends Position

A simple offset-based position *

NOTE: This is not a public or final API; if you rely on this be prepared to adjust your code for the next tools release.


Constructor Summary
DefaultPosition(int line, int column, int offset)
          Creates a new DefaultPosition
 
Method Summary
 int getColumn()
          Returns the column number (where the first character on the line is 0), or -1 if unknown
 int getLine()
          Returns the line number (0-based where the first line is line 0)
 int getOffset()
          The character offset
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultPosition

public DefaultPosition(int line,
                       int column,
                       int offset)
Creates a new DefaultPosition

Parameters:
line - the 0-based line number, or -1 if unknown
column - the 0-based column number, or -1 if unknown
offset - the offset, or -1 if unknown
Method Detail

getLine

public int getLine()
Description copied from class: Position
Returns the line number (0-based where the first line is line 0)

Specified by:
getLine in class Position
Returns:
the 0-based line number

getOffset

public int getOffset()
Description copied from class: Position
The character offset

Specified by:
getOffset in class Position
Returns:
the 0-based character offset

getColumn

public int getColumn()
Description copied from class: Position
Returns the column number (where the first character on the line is 0), or -1 if unknown

Specified by:
getColumn in class Position
Returns:
the 0-based column number