public class SqlParserPos extends Object implements Serializable
| Modifier and Type | Field and Description |
|---|---|
private int |
columnNumber |
private int |
endColumnNumber |
private int |
endLineNumber |
private int |
lineNumber |
private static com.google.common.base.Function<SqlNode,SqlParserPos> |
NODE_TO_POS |
private static long |
serialVersionUID |
static SqlParserPos |
ZERO
SqlParserPos representing line one, character one.
|
| Constructor and Description |
|---|
SqlParserPos(int lineNumber,
int columnNumber)
Creates a new parser position.
|
SqlParserPos(int startLineNumber,
int startColumnNumber,
int endLineNumber,
int endColumnNumber)
Creates a new parser range.
|
| Modifier and Type | Method and Description |
|---|---|
private boolean |
endsAfter(SqlParserPos pos) |
boolean |
equals(Object o) |
int |
getColumnNum() |
int |
getEndColumnNum() |
int |
getEndLineNum() |
int |
getLineNum() |
int |
hashCode() |
boolean |
overlaps(SqlParserPos pos) |
SqlParserPos |
plus(SqlParserPos pos)
Combines this parser position with another to create a
position that spans from the first point in the first to the last point
in the other.
|
SqlParserPos |
plusAll(Collection<SqlNode> nodeList)
Combines this parser position with a list of positions.
|
SqlParserPos |
plusAll(SqlNode[] nodes)
Combines this parser position with an array of positions to create a
position that spans from the first point in the first to the last point
in the other.
|
boolean |
startsAt(SqlParserPos pos) |
private boolean |
startsBefore(SqlParserPos pos) |
private static SqlParserPos |
sum_(List<SqlParserPos> positions)
Combines a list of parser positions to create a position which spans
from the beginning of the first to the end of the last.
|
static SqlParserPos |
sum(Iterable<SqlParserPos> poses)
Combines an iterable of parser positions to create a position which spans
from the beginning of the first to the end of the last.
|
private static SqlParserPos |
sum(Iterable<SqlParserPos> poses,
int line,
int column,
int endLine,
int endColumn)
Computes the parser position which is the sum of an array of parser
positions and of a parser position represented by (line, column, endLine,
endColumn).
|
static SqlParserPos |
sum(List<? extends SqlNode> nodes)
Combines the parser positions of a list of nodes to create a position
which spans from the beginning of the first to the end of the last.
|
static SqlParserPos |
sum(SqlNode[] nodes)
Combines the parser positions of an array of nodes to create a position
which spans from the beginning of the first to the end of the last.
|
private static Iterable<SqlParserPos> |
toPos(Iterable<SqlNode> nodes) |
private static List<SqlParserPos> |
toPos(SqlNode[] nodes) |
String |
toString() |
public static final SqlParserPos ZERO
private static final long serialVersionUID
private static final com.google.common.base.Function<SqlNode,SqlParserPos> NODE_TO_POS
private final int lineNumber
private final int columnNumber
private final int endLineNumber
private final int endColumnNumber
public SqlParserPos(int lineNumber,
int columnNumber)
public SqlParserPos(int startLineNumber,
int startColumnNumber,
int endLineNumber,
int endColumnNumber)
public int getLineNum()
public int getColumnNum()
public int getEndLineNum()
public int getEndColumnNum()
public SqlParserPos plus(SqlParserPos pos)
public SqlParserPos plusAll(SqlNode[] nodes)
public SqlParserPos plusAll(Collection<SqlNode> nodeList)
public static SqlParserPos sum(SqlNode[] nodes)
private static List<SqlParserPos> toPos(SqlNode[] nodes)
private static Iterable<SqlParserPos> toPos(Iterable<SqlNode> nodes)
public static SqlParserPos sum(List<? extends SqlNode> nodes)
public static SqlParserPos sum(Iterable<SqlParserPos> poses)
private static SqlParserPos sum_(List<SqlParserPos> positions)
private static SqlParserPos sum(Iterable<SqlParserPos> poses, int line, int column, int endLine, int endColumn)
poses - Array of parser positionsline - Start linecolumn - Start columnendLine - End lineendColumn - End columnpublic boolean overlaps(SqlParserPos pos)
private boolean startsBefore(SqlParserPos pos)
private boolean endsAfter(SqlParserPos pos)
public boolean startsAt(SqlParserPos pos)
Copyright © 2012–2018 The Apache Software Foundation. All rights reserved.