Class ChannelDispatcher<O>

java.lang.Object
org.sonar.sslr.channel.Channel<O>
org.sonar.sslr.channel.ChannelDispatcher<O>

public class ChannelDispatcher<O> extends Channel<O>
  • Method Details

    • consume

      public boolean consume(CodeReader code, O output)
      Description copied from class: Channel
      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.
      Specified by:
      consume in class Channel<O>
      Parameters:
      code - the handle on the input character stream
      output - 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.
    • builder

      public static ChannelDispatcher.Builder builder()
      Get a Builder instance to build a new ChannelDispatcher