|
GXPARSE hosted by | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object ca.gorman.util.scan.ScanRuleDelegator
public class ScanRuleDelegator
Realization of ScanRule
that delegates to a
ScanMatch
and a scanAction
.
Constructor Summary | |
---|---|
protected |
ScanRuleDelegator(ScanMatch scanMatch)
Delegate to a ScanMatch , but do nothing when match
succeeds. |
protected |
ScanRuleDelegator(ScanMatch scanMatch,
ScanAction scanAction)
Delegate to a ScanMatch and a
scanAction . |
Method Summary | |
---|---|
void |
action(ScanState scanState,
MatchedText matchedText)
Do something with text that has been matched by a
scanRule . |
MatchedText |
match(ScanBuffer scanBuffer)
Test characters at the beginning of a ScanBuffer ,
removing any matching CharSequence and returning it as
MatchedText . |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
protected ScanRuleDelegator(ScanMatch scanMatch)
Delegate to a ScanMatch
, but do nothing when match
succeeds.
NullPointerException
- if any scanMatch
is nullprotected ScanRuleDelegator(ScanMatch scanMatch, ScanAction scanAction)
Delegate to a ScanMatch
and a
scanAction
.
NullPointerException
- if any parameter is nullMethod Detail |
---|
public MatchedText match(ScanBuffer scanBuffer) throws IOException
ScanMatch
Test characters at the beginning of a ScanBuffer
,
removing any matching CharSequence
and returning it as
MatchedText
.
This method is reentrant and thread-safe.
match
in interface ScanMatch
IOException
public void action(ScanState scanState, MatchedText matchedText) throws IOException
ScanAction
Do something with text that has been matched
by a
scanRule
.
action
in interface ScanAction
IOException
|
GXPARSE download | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |