Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## gudusoft.gsqlparser
Class TSourceTokenList

    java.lang.Object
      gudusoft.gsqlparser.TSourceTokenList

All Implemented Interfaces:
  java.util.Iterator<TSourceToken>

    public class TSourceTokenList

extends java.lang.Object
implements java.util.Iterator<TSourceToken>

List of source token.

Constructor Summary
`TSourceTokenList()`

Method Summary
`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()`
`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, java.lang.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, java.lang.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()`

Methods inherited from class java.lang.Object
`equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### TSourceTokenList

    public TSourceTokenList()

Method Detail

### getGsqlparser

    public TGSqlParser getGsqlparser()

### setGsqlparser

    public void setGsqlparser(TGSqlParser gsqlparser)

### resetiterator

    public void resetiterator()

### hasNext

    public boolean hasNext()

  Specified by:
    `hasNext` in interface `java.util.Iterator<TSourceToken>`

### next

    public TSourceToken next()

  Specified by:
    `next` in interface `java.util.Iterator<TSourceToken>`

### remove

    public void remove()

  Not supportted yet.

  Specified by:
    `remove` in interface `java.util.Iterator<TSourceToken>`

### get

    public TSourceToken get(int index)

### add

    public void add(TSourceToken st)

### add

    public void add(int index,
                    TSourceToken st)

### remove

    public void remove(int index)

### remove

    public void remove(TSourceToken st)

### size

    public int size()

### clear

    public void clear()

### nextsolidtoken

    public TSourceToken nextsolidtoken(TSourceToken ptoken,
                                       int pstep,
                                       boolean pcmtissolidtoken)

  Find solid token start from ptoken, distance is pstep.

  Parameters:
    `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.
  Returns:

### nextsolidtoken

    public TSourceToken nextsolidtoken(int ptokenpos,
                                       int pstep,
                                       boolean pcmtissolidtoken)

  Find solid token start from ptoken, distance is pstep.

  Parameters:
    `ptokenpos` - Search start from this position.
    `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.
  Returns:

### solidtokenafterpos

    public int solidtokenafterpos(int pStart,
                                  int pTokenCode,
                                  int pSteps,
                                  java.lang.String pIgnoreThisString)

  Search token by token code, start from pStart within range pSteps, and ignore pIngoreThisString if any during searching. Ingore non-solid token while searching.

  Parameters:
    `pStart` - Start from this position.
    `pTokenCode` - TokenCode that search for.
    `pSteps` - Must > 0.
    `pIgnoreThisString` - String to be ignored.
  Returns:
    0 if no token found, otherwise, return position in sourcetoken list.

### solidtokenbefore

    public TSourceToken solidtokenbefore(int pStart)

  Search solid token before pStart.

  Parameters:
    `pStart` -
  Returns:
    return null if no token found.

### sqlplusaftercurtoken

    public boolean sqlplusaftercurtoken()

### returnaftercurtoken

    public boolean returnaftercurtoken(boolean ignorecmt)

  Is there linebreak after current token.

  Parameters:
    `ignorecmt` - If it's true, ignore comment while searching linebreak.
  Returns:

### returnbeforecurtoken

    public boolean returnbeforecurtoken(boolean ignorecomment)

  Is there a linebreak before current token, comment is not ignored if ignorecomment is true, space is ignored.

  Returns:

### searchToken

    public TSourceToken searchToken(int targetTokenCode,
                                    java.lang.String targetTokenText,
                                    TSourceToken startToken,
                                    int range)

  Parameters:
    `targetTokenCode,` - >0, search target token by token code; = 0, search target token by token text
    `targetTokenText` -
    `startToken` -
    `range,` - > 0, search token after startToken = 0, just compare with this startToken, < 0, search token before startToken
  Returns:

### setTokenStatus

    public void setTokenStatus(ETokenStatus ps,
                               int pstart,
                               int pend)

### indexOf

    public int indexOf(TSourceToken pst)

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD