org.sonar.channel
Class Channel<OUTPUT>
java.lang.Object
org.sonar.channel.Channel<OUTPUT>
- Direct Known Subclasses:
- ChannelDispatcher, RegexChannel, Tokenizer
public abstract class Channel<OUTPUT>
- extends Object
Method Summary |
abstract 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 |
Channel
public Channel()
consume
public abstract boolean consume(CodeReader code,
OUTPUT output)
- Tries to consume the character stream at the current reading cursor position (provided by the
CodeReader
). If
the character stream is consumed the method must return true and the OUTPUT object can be fed.
- Parameters:
code
- the handle on the input character streamoutput
- the OUTPUT that can be optionally fed by the Channel
- Returns:
- false if the Channel doesn't want to consume the character stream, true otherwise.
Copyright © 2009-2012 SonarSource. All Rights Reserved.