|
GXPARSE hosted by |
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectca.gorman.util.scan.spi.AbstractScanState
public abstract class AbstractScanState
A ScanState factory.
| Constructor Summary | |
|---|---|
protected |
AbstractScanState(InputScanBuffer inputScanBuffer,
Appendable appendable,
RuleList ruleList)
|
| Method Summary | |
|---|---|
boolean |
containsKey(String key)
Find out whether a particular key has been used to save a
value. |
CharSequence |
get(String key)
Get a CharSequence that has been
saved as the value
for a specific key. |
InputScanBuffer |
getInputScanBuffer()
|
Map<String,CharSequence> |
getMap()
Get the map that supports saving
and retrieving character sequences as
temporary values. |
RuleList |
getRuleList()
|
boolean |
isTerminationRequested()
Indicate whether the Scanner has been requested to stop. |
AbstractScanState |
newInstance(InputScanBuffer inputScanBuffer,
Appendable appendable,
RuleList ruleList)
|
Writer |
out()
Get the default output destination of the Scanner. |
int |
outputStackSize()
Return the number of Appendable items pushed on stack. |
Appendable |
popOutput()
Restore the previous default output (optional operation). |
RuleList |
popRuleList()
Restore the previous scanning rules (optional operation). |
void |
pushOutput(Appendable appendable)
Temporarily change the default output (optional operation). |
void |
pushRuleList(RuleList ruleList)
Temporarily change the scanning rules (optional operation). |
CharSequence |
put(String key,
CharSequence value)
Save a CharSequence as the value associated with a
key. |
void |
requestTermination()
Request the Scanner to discontinue scanning at the end
of the action from
which this method has been invoked. |
int |
ruleListStackSize()
Return the number of RuleList items pushed on stack. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
protected AbstractScanState(InputScanBuffer inputScanBuffer,
Appendable appendable,
RuleList ruleList)
| Method Detail |
|---|
public AbstractScanState newInstance(InputScanBuffer inputScanBuffer,
Appendable appendable,
RuleList ruleList)
public void pushRuleList(RuleList ruleList)
ScanState
Temporarily change the scanning rules (optional operation). The change
becomes effective when control returns from the currently active
ScanRule action.
pushRuleList in interface ScanStatepublic RuleList popRuleList()
ScanState
Restore the previous scanning rules (optional operation). The change
becomes effective when control returns from the currently active
ScanRule action.
popRuleList in interface ScanStatepublic int ruleListStackSize()
ScanState
Return the number of RuleList items pushed on stack.
ruleListStackSize in interface ScanStatepublic void pushOutput(Appendable appendable)
ScanStateTemporarily change the default output (optional operation). The change becomes effective immediately.
If the currently active default output is a
Flushable, it will be flushed before the new
default ouput is put on the output stack.
pushOutput in interface ScanStatepublic Appendable popOutput()
ScanStateRestore the previous default output (optional operation). The change becomes effective immediately.
If the currently active default output is a
Flushable, it will be flushed, before being
popped from the output stack.
popOutput in interface ScanStatepublic int outputStackSize()
ScanState
Return the number of Appendable items pushed on stack.
outputStackSize in interface ScanStatepublic Writer out()
ScanState
Get the default output destination of the Scanner.
The close method throws
UnsupportedOperationException
because the default output destination must remain available while the
Scanner is running..
Scanner default output methods should not be invoked from outside the
action method of a
ScanRule. Doing so may cause an
IllegalStateException.
out in interface ScanStatepublic CharSequence get(String key)
ScanState
Get a CharSequence that has been
saved as the value
for a specific key. All keys are cleared when a
ScanRule completes an
action.
get in interface ScanState
public CharSequence put(String key,
CharSequence value)
ScanState
Save a CharSequence as the value associated with a
key. Replaces any previous value saved against the same
key. All keys are cleared when a
ScanRule completes an
action.
put in interface ScanStatepublic boolean containsKey(String key)
ScanState
Find out whether a particular key has been used to save a
value. All keys are cleared when a ScanRule completes
an action.
containsKey in interface ScanStatepublic Map<String,CharSequence> getMap()
ScanState
Get the map that supports
saving
and retrieving character sequences as
temporary values.
getMap in interface ScanStatepublic RuleList getRuleList()
public void requestTermination()
ScanState
Request the Scanner to discontinue scanning at the end
of the action from
which this method has been invoked.
requestTermination in interface ScanStatepublic boolean isTerminationRequested()
ScanState
Indicate whether the Scanner has been requested to stop.
This method is normally used only by implementors.
isTerminationRequested in interface ScanStatepublic InputScanBuffer getInputScanBuffer()
|
GXPARSE download | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||