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.Object
Base 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 class
Highlighter.IgnoreCaseComparator
-
Field Summary
Fields Modifier and Type Field Description static java.util.regex.Pattern
XMLname
validates 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.String
getDefaultStyle()
The default style nameabstract boolean
highlight(CharIter in, java.util.List<Block> out)
Perform highlighting on the current token stream.void
init(Params params)
Initializerstatic boolean
isNewLine(java.lang.Character c)
void
reset()
Reset this highlighter to it's initially configured stateboolean
startsWith(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
-
-