public class SqlParserPos extends Object implements Serializable
| Modifier and Type | Field and Description |
|---|---|
static SqlParserPos |
QUOTED_ZERO
Same as
ZERO but always quoted. |
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 |
|---|---|
boolean |
equals(@Nullable Object o) |
int |
getColumnNum()
Returns 1-based starting column number.
|
int |
getEndColumnNum()
Returns 1-based end column number (same as starting column number if the
ParserPos is a point, not a range).
|
int |
getEndLineNum()
Returns 1-based end line number (same as starting line number if the
ParserPos is a point, not a range).
|
int |
getLineNum()
Returns 1-based starting line number.
|
int |
hashCode() |
boolean |
isQuoted()
Returns whether this SqlParserPos is quoted.
|
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<? extends SqlNode> nodes)
Combines this parser position with a list of positions.
|
SqlParserPos |
plusAll(@Nullable 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) |
static SqlParserPos |
sum(Iterable<SqlParserPos> poses)
Returns a position spanning the earliest position to the latest.
|
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.
|
String |
toString() |
SqlParserPos |
withQuoting(boolean quoted)
Returns a
SqlParserPos the same as this but quoted. |
public static final SqlParserPos ZERO
public static final SqlParserPos QUOTED_ZERO
ZERO but always quoted.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 withQuoting(boolean quoted)
SqlParserPos the same as this but quoted.public boolean isQuoted()
public SqlParserPos plus(SqlParserPos pos)
public SqlParserPos plusAll(@Nullable SqlNode[] nodes)
public SqlParserPos plusAll(Collection<? extends SqlNode> nodes)
public static SqlParserPos sum(SqlNode[] nodes)
public static SqlParserPos sum(List<? extends SqlNode> nodes)
public static SqlParserPos sum(Iterable<SqlParserPos> poses)
public boolean overlaps(SqlParserPos pos)
public boolean startsAt(SqlParserPos pos)
Copyright © 2012-2022 Apache Software Foundation. All Rights Reserved.