net.sf.xslthl.highlighters
Class RegexHighlighterEx

java.lang.Object
  extended by net.sf.xslthl.Highlighter
      extended by net.sf.xslthl.highlighters.RegexHighlighterEx

public class RegexHighlighterEx
extends Highlighter

Regular expression highlighter. Accepted parameters:

pattern
The regular expression pattern to be matched.
flags
Flags, see javadoc (use the constant names AS IS)


Nested Class Summary
 
Nested classes/interfaces inherited from class net.sf.xslthl.Highlighter
Highlighter.IgnoreCaseComparator
 
Field Summary
protected  boolean finished
          If true this matcher is done
protected  Matcher matcher
          Matcher used to find locations
protected  Pattern pattern
           
 
Fields inherited from class net.sf.xslthl.Highlighter
styleName, XMLname
 
Constructor Summary
RegexHighlighterEx()
           
 
Method Summary
 String getDefaultStyle()
          The default style name
 boolean highlight(CharIter in, List<Block> out)
          Perform highlighting on the current token stream.
 void init(Params params)
          Initializer
 void reset()
          Reset this highlighter to it's initially configured state
 boolean startsWith(CharIter in)
          return true if the current character is a possible match for this highlighter
 
Methods inherited from class net.sf.xslthl.Highlighter
isNewLine
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

pattern

protected Pattern pattern

matcher

protected Matcher matcher
Matcher used to find locations


finished

protected boolean finished
If true this matcher is done

Constructor Detail

RegexHighlighterEx

public RegexHighlighterEx()
Method Detail

init

public void init(Params params)
          throws HighlighterConfigurationException
Description copied from class: Highlighter
Initializer

Overrides:
init in class Highlighter
Throws:
HighlighterConfigurationException

getDefaultStyle

public String getDefaultStyle()
Description copied from class: Highlighter
The default style name

Specified by:
getDefaultStyle in class Highlighter
Returns:

reset

public void reset()
Description copied from class: Highlighter
Reset this highlighter to it's initially configured state

Overrides:
reset in class Highlighter

startsWith

public boolean startsWith(CharIter in)
Description copied from class: Highlighter
return true if the current character is a possible match for this highlighter

Overrides:
startsWith in class Highlighter
Returns:

highlight

public boolean highlight(CharIter in,
                         List<Block> out)
Description copied from class: Highlighter
Perform highlighting on the current token stream. Return true when highlighting was performed, or false in case of a false positive.

Specified by:
highlight in class Highlighter
Returns:


Copyright © 2005-2014. All Rights Reserved.