public class SqlTokenizerImpl extends java.lang.Object implements SqlTokenizer
SqlTokenizer
Implementation.SqlTokenizer.TokenType
Constructor and Description |
---|
SqlTokenizerImpl(java.lang.String sql) |
Modifier and Type | Method and Description |
---|---|
java.lang.String |
getAfter() |
java.lang.String |
getBefore() |
protected int |
getNextStartPos(int commentStartPos,
int elseCommentStartPos,
int bindVariableStartPos)
Returns the next starting position.
|
SqlTokenizer.TokenType |
getNextTokenType() |
int |
getPosition() |
java.lang.String |
getSql() |
java.lang.String |
getToken() |
SqlTokenizer.TokenType |
getTokenType() |
SqlTokenizer.TokenType |
next() |
protected java.lang.String |
nextBindVariableName() |
protected void |
parseBindVariable()
Parse the bind variable.
|
protected void |
parseComment()
Parse the comment.
|
protected void |
parseElse()
Parse the ELSE comment.
|
protected void |
parseEof()
Parse the end of the SQL.
|
protected void |
parseSql()
Parse the SQL.
|
java.lang.String |
skipToken()
Skips a token.
|
java.lang.String |
skipWhitespace()
Skips the whitespace.
|
public java.lang.String getSql()
getSql
in interface SqlTokenizer
public int getPosition()
getPosition
in interface SqlTokenizer
public java.lang.String getToken()
getToken
in interface SqlTokenizer
public java.lang.String getBefore()
getBefore
in interface SqlTokenizer
public java.lang.String getAfter()
getAfter
in interface SqlTokenizer
public SqlTokenizer.TokenType getTokenType()
getTokenType
in interface SqlTokenizer
public SqlTokenizer.TokenType getNextTokenType()
getNextTokenType
in interface SqlTokenizer
public SqlTokenizer.TokenType next()
next
in interface SqlTokenizer
protected void parseSql()
protected int getNextStartPos(int commentStartPos, int elseCommentStartPos, int bindVariableStartPos)
commentStartPos
- starting position of the commentelseCommentStartPos
- starting position of the ELSE commentbindVariableStartPos
- starting position of the bind variableprotected void parseComment()
protected void parseBindVariable()
protected void parseElse()
protected void parseEof()
protected java.lang.String nextBindVariableName()
public java.lang.String skipToken()
SqlTokenizer
skipToken
in interface SqlTokenizer
public java.lang.String skipWhitespace()
SqlTokenizer
skipWhitespace
in interface SqlTokenizer