Interface ControlHandler<E extends Exception>

All Known Subinterfaces:
TokenHandler, TokenHandler2, TokenHandler3<E>
All Known Implementing Classes:
CommentRemovalHandler

public interface ControlHandler<E extends Exception>
To be implemented by listeners that handle the control-related events generated by the TokenProducer3.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    control(int index, int codePoint)
    A control character codepoint was found.
    void
    quotedNewlineChar(int index, int codePoint)
    An unescaped FF/LF/CR control was found while assembling a quoted string.
    void
    At the beginning of parsing, this method is called, passing the TokenControl object that can be used to fine-control the parsing.
  • Method Details

    • tokenStart

      void tokenStart(TokenControl control)
      At the beginning of parsing, this method is called, passing the TokenControl object that can be used to fine-control the parsing.
      Parameters:
      control - the TokenControl object in charge of parsing.
      Throws:
      E - in case of an error when processing the tokens.
    • control

      void control(int index, int codePoint) throws E
      A control character codepoint was found.
      Parameters:
      index - the index at which the control codepoint was found.
      codePoint - the control codepoint.
      Throws:
      E - in case of an error when processing the tokens.
    • quotedNewlineChar

      void quotedNewlineChar(int index, int codePoint) throws E
      An unescaped FF/LF/CR control was found while assembling a quoted string.
      Parameters:
      index - the index at which the control was found.
      codePoint - the FF/LF/CR codepoint.
      Throws:
      E - in case of an error when processing the tokens.