|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.prorefactor.refactor.ScanLib
public class ScanLib
Library of functions for working with a scanner and its token list.
Method Summary | |
---|---|
void |
copyAndMark(int begin,
int end)
Copy and mark a section for future removal. |
java.lang.String |
copyToText(int begin,
int end)
|
void |
cutSectionHard(int begin,
int end)
"Hard" cut a scanner section, from an input beginning through to and including an input end, from a scanner token list. |
static ScanLib |
getInstance()
This class implements the "Singleton" design pattern. |
void |
insertSection(int begin,
int end,
int insertBefore)
|
boolean |
isAllWhitespace(int scanNum)
Is the scanner list all whitespace? |
void |
markToBeCut(int begin,
int end)
Mark a section for future removal. |
int |
seek(int h1,
int h2)
Seek to a token in a scan list. |
int |
seek(int theLine,
int theColumn,
int h2)
Seek to a token in a scan list. |
int |
seekFromTop(int line,
int col,
int scanNum,
int tokenHandle)
Seek a scan handle to a file position. |
void |
sweep(int scanNum)
Sweep out all tokens from a scanner's token list which have been marked as "cut". |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static ScanLib getInstance()
public void copyAndMark(int begin, int end)
begin
- Handle to first token to be cut out.
On return, will point to the beginning of the "copied out" chain.end
- Handle to last token to be cut out.
On return, will point to the end of the "copied out" chain.public java.lang.String copyToText(int begin, int end)
public void cutSectionHard(int begin, int end)
begin
- Handle to first token to be cut out.end
- Handle to last token to be cut out.public void insertSection(int begin, int end, int insertBefore)
public boolean isAllWhitespace(int scanNum)
public void markToBeCut(int begin, int end)
begin
- Handle to first token to be cut out.end
- Handle to last token to be cut out.public int seek(int h1, int h2)
The
- handle with the row/column we want to reposition toThe
- handle that gets moved
public int seek(int theLine, int theColumn, int h2)
public int seekFromTop(int line, int col, int scanNum, int tokenHandle)
line
- Line to seek to.col
- Column to seek to.scanNum
- The scanner number.tokenHandle
- Handle to reposition. Unlike other functions in
this library, this does not already have to be pointing to an
earlier token in the scan list.
public void sweep(int scanNum) throws RefactorException
RefactorException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |