net.sf.xslthl
Class Highlighter

java.lang.Object
  extended by net.sf.xslthl.Highlighter
Direct Known Subclasses:
AnnotationHighlighter, HeredocHighlighter, KeywordsHighlighter, MultilineCommentHighlighter, NumberHighlighter, OnelineCommentHighlighter, RegexHighlighterEx, StringHighlighter, WholeHighlighter, WordHighlighter

public abstract class Highlighter
extends Object

Base highlighter. Accepted parameters:

Style
The style to use in the generated block. Must be a valid XML name.


Nested Class Summary
static class Highlighter.IgnoreCaseComparator
           
 
Field Summary
protected  String styleName
          The name of the style to use
static Pattern XMLname
          validates a valid XML name (note: ':' is not allowed) http://www.w3.org/TR/2000/REC-xml-20001006#NT-Letter
 
Constructor Summary
Highlighter()
           
 
Method Summary
abstract  String getDefaultStyle()
          The default style name
abstract  boolean highlight(CharIter in, List<Block> out)
          Perform highlighting on the current token stream.
 void init(Params params)
          Initializer
static boolean isNewLine(Character c)
           
 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 java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

XMLname

public static final Pattern XMLname
validates a valid XML name (note: ':' is not allowed) http://www.w3.org/TR/2000/REC-xml-20001006#NT-Letter


styleName

protected String styleName
The name of the style to use

Constructor Detail

Highlighter

public Highlighter()
Method Detail

isNewLine

public static final boolean isNewLine(Character c)

init

public void init(Params params)
          throws HighlighterConfigurationException
Initializer

Parameters:
params -
Throws:
HighlighterConfigurationException

startsWith

public boolean startsWith(CharIter in)
return true if the current character is a possible match for this highlighter

Parameters:
in -
Returns:

highlight

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

Parameters:
in -
out -
Returns:

getDefaultStyle

public abstract String getDefaultStyle()
The default style name

Returns:

reset

public void reset()
Reset this highlighter to it's initially configured state



Copyright © 2005-2014. All Rights Reserved.