Package org.sonar.sslr.channel
Class Channel<O>
java.lang.Object
org.sonar.sslr.channel.Channel<O>
- Direct Known Subclasses:
BlackHoleChannel,BomCharacterChannel,ChannelDispatcher,CommentRegexpChannel,IdentifierAndKeywordChannel,PunctuatorChannel,RegexChannel,RegexpChannel,UnknownCharacterChannel
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionabstract booleanconsume(CodeReader code, O output) Tries to consume the character stream at the current reading cursor position (provided by theCodeReader).
-
Constructor Details
-
Channel
public Channel()
-
-
Method Details
-
consume
Tries to consume the character stream at the current reading cursor position (provided by theCodeReader). 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.
-