public class RegexpTokenizer extends NotThreadSafeTokenizer
Constructor and Description |
---|
RegexpTokenizer(String tagBefore,
String tagAfter,
String regexp) |
Modifier and Type | Method and Description |
---|---|
RegexpTokenizer |
clone() |
boolean |
consume(CodeReader code,
HtmlCodeBuilder codeBuilder)
Tries to consume the character stream at the current reading cursor position (provided by the
CodeReader ). |
public RegexpTokenizer(String tagBefore, String tagAfter, String regexp)
tagBefore
- Html tag to add before the tokentagAfter
- Html tag to add after the tokenregexp
- Regular expression which must be used to match tokenpublic boolean consume(CodeReader code, HtmlCodeBuilder codeBuilder)
Channel
CodeReader
). If
the character stream is consumed the method must return true and the OUTPUT object can be fed.consume
in class Channel<HtmlCodeBuilder>
code
- the handle on the input character streamcodeBuilder
- the OUTPUT that can be optionally fed by the Channelpublic RegexpTokenizer clone()
clone
in class NotThreadSafeTokenizer
Copyright © 2009-2012 SonarSource. All Rights Reserved.