Package net.sf.xslthl
Class Highlighter
- java.lang.Object
-
- net.sf.xslthl.Highlighter
-
- Direct Known Subclasses:
AnnotationHighlighter,HeredocHighlighter,KeywordsHighlighter,MultilineCommentHighlighter,NumberHighlighter,OnelineCommentHighlighter,RegexHighlighterEx,StringHighlighter,WholeHighlighter,WordHighlighter
public abstract class Highlighter extends java.lang.ObjectBase highlighter. Accepted parameters:- Style
- The style to use in the generated block. Must be a valid XML name.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classHighlighter.IgnoreCaseComparator
-
Field Summary
Fields Modifier and Type Field Description static java.util.regex.PatternXMLnamevalidates a valid XML name (note: ':' is not allowed) http://www.w3.org/TR/2000/REC-xml-20001006#NT-Letter
-
Constructor Summary
Constructors Constructor Description Highlighter()
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description abstract java.lang.StringgetDefaultStyle()The default style nameabstract booleanhighlight(CharIter in, java.util.List<Block> out)Perform highlighting on the current token stream.voidinit(Params params)Initializerstatic booleanisNewLine(java.lang.Character c)voidreset()Reset this highlighter to it's initially configured statebooleanstartsWith(CharIter in)return true if the current character is a possible match for this highlighter
-
-
-
Method Detail
-
isNewLine
public static final boolean isNewLine(java.lang.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, java.util.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 java.lang.String getDefaultStyle()
The default style name- Returns:
-
reset
public void reset()
Reset this highlighter to it's initially configured state
-
-