public class TSourceTokenList extends Object implements Iterator<TSourceToken>
Constructor and Description |
---|
TSourceTokenList() |
Modifier and Type | Method and Description |
---|---|
void |
add(int index,
TSourceToken st) |
void |
add(TSourceToken st) |
void |
clear() |
TSourceToken |
get(int index) |
TGSqlParser |
getGsqlparser() |
boolean |
hasNext() |
int |
indexOf(TSourceToken pst) |
TSourceToken |
next() |
int |
nextObjectNameToken(int ptokenpos,
int pstep,
boolean pcmtissolidtoken)
Search token of the next/previous object
|
TSourceToken |
nextsolidtoken(int ptokenpos,
int pstep,
boolean pcmtissolidtoken)
Find solid token start from ptoken, distance is pstep.
|
TSourceToken |
nextsolidtoken(TSourceToken ptoken,
int pstep,
boolean pcmtissolidtoken)
Find solid token start from ptoken, distance is pstep.
|
void |
remove()
Not supportted yet.
|
void |
remove(int index) |
void |
remove(TSourceToken st) |
void |
resetiterator() |
boolean |
returnaftercurtoken(boolean ignorecmt)
Is there linebreak after current token.
|
boolean |
returnbeforecurtoken(boolean ignorecomment)
Is there a linebreak before current token, comment is not ignored if ignorecomment is true,
space is ignored.
|
TSourceToken |
searchToken(int targetTokenCode,
String targetTokenText,
TSourceToken startToken,
int range) |
void |
setGsqlparser(TGSqlParser gsqlparser) |
void |
setTokenStatus(ETokenStatus ps,
int pstart,
int pend) |
int |
size() |
int |
solidtokenafterpos(int pStart,
int pTokenCode,
int pSteps,
String pIgnoreThisString)
Search token by token code, start from pStart within range pSteps, and ignore pIngoreThisString if any during searching.
|
TSourceToken |
solidtokenbefore(int pStart)
Search solid token before pStart.
|
boolean |
sqlplusaftercurtoken() |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
forEachRemaining
public TGSqlParser getGsqlparser()
public void setGsqlparser(TGSqlParser gsqlparser)
public void resetiterator()
public boolean hasNext()
hasNext
in interface Iterator<TSourceToken>
public TSourceToken next()
next
in interface Iterator<TSourceToken>
public void remove()
remove
in interface Iterator<TSourceToken>
public TSourceToken get(int index)
public void add(TSourceToken st)
public void add(int index, TSourceToken st)
public void remove(int index)
public void remove(TSourceToken st)
public int size()
public void clear()
public TSourceToken nextsolidtoken(TSourceToken ptoken, int pstep, boolean pcmtissolidtoken)
ptoken
- Search start from this token.pstep
- If pstep >0 then find solid token after ptoken, if pstep < 0 then find solid token before ptoken.pcmtissolidtoken
- If it's true then treat comment as solid token.public TSourceToken nextsolidtoken(int ptokenpos, int pstep, boolean pcmtissolidtoken)
ptokenpos
- Search start from this position, not include this tokenpstep
- If pstep >0 then find solid token after ptoken, if pstep < 0 then find solid token before ptoken.pcmtissolidtoken
- If it's true then treat comment as solid token.public int nextObjectNameToken(int ptokenpos, int pstep, boolean pcmtissolidtoken)
ptokenpos,
- search from this token, not included.pstep
- pstep > 0 means search forward, <0 means search backwardpcmtissolidtoken,
- treat comment as solid token if it's true.public int solidtokenafterpos(int pStart, int pTokenCode, int pSteps, String pIgnoreThisString)
pStart
- Start from this position.pTokenCode
- TokenCode that search for.pSteps
- Must > 0.pIgnoreThisString
- String to be ignored.public TSourceToken solidtokenbefore(int pStart)
pStart
- public boolean sqlplusaftercurtoken()
public boolean returnaftercurtoken(boolean ignorecmt)
ignorecmt
- If it's true, ignore comment while searching linebreak.public boolean returnbeforecurtoken(boolean ignorecomment)
public TSourceToken searchToken(int targetTokenCode, String targetTokenText, TSourceToken startToken, int range)
targetTokenCode,
- >0, search target token by token code; = 0, search target token by token texttargetTokenText
- startToken
- range,
- > 0, search token after startToken
= 0, just compare with this startToken,
< 0, search token before startTokenpublic void setTokenStatus(ETokenStatus ps, int pstart, int pend)
public int indexOf(TSourceToken pst)
Copyright © 2019. All rights reserved.