|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.sonar.channel.Channel<OUTPUT>
org.sonar.channel.RegexChannel<OUTPUT>
public abstract class RegexChannel<OUTPUT>
The RegexChannel can be used to be called each time the next characters in the character stream match a regular expression
| Constructor Summary | |
|---|---|
RegexChannel(String regex)
Create a RegexChannel object with the required regular expression |
|
| Method Summary | |
|---|---|
protected abstract void |
consume(CharSequence token,
OUTPUT output)
The consume method is called each time the regular expression used to create the RegexChannel object matches the next characters in the character streams. |
boolean |
consume(CodeReader code,
OUTPUT output)
Tries to consume the character stream at the current reading cursor position (provided by the CodeReader). |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public RegexChannel(String regex)
regex - regular expression to be used to try matching the next characters in the stream| Method Detail |
|---|
public final boolean consume(CodeReader code,
OUTPUT output)
ChannelCodeReader). If
the character stream is consumed the method must return true and the OUTPUT object can be fed.
consume in class Channel<OUTPUT>code - the handle on the input character streamoutput - the OUTPUT that can be optionally fed by the Channel
protected abstract void consume(CharSequence token,
OUTPUT output)
token - the token consumed in the character stream and matching the regular expressionthe - OUPUT object which can be optionally fed
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||