Class SectionBlockParser
java.lang.Object
org.apache.maven.doxia.module.twiki.parser.SectionBlockParser
- All Implemented Interfaces:
BlockParser
Parse looking for sections
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final Pattern'---++ Header', '---## Header'private HRuleBlockParserParagraphBlockParserto use.private ParagraphBlockParserParagraphBlockParserto use.private VerbatimBlockParser -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanaccept.(package private) static intfinal voidsetHrulerParser(HRuleBlockParser hrulerParser) Sets the hrulerParser.final voidsetParaParser(ParagraphBlockParser paraParser) Sets the paraParser.final voidsetVerbatimBlockParser(VerbatimBlockParser verbatimBlockParser) Sets the verbatimBlockParser.final Blockvisit(String line, ByLineSource source) visit.
-
Field Details
-
HEADER_DA
'---++ Header', '---## Header' -
paraParser
ParagraphBlockParserto use. injected -
hrulerParser
ParagraphBlockParserto use. injected -
verbatimBlockParser
-
-
Constructor Details
-
SectionBlockParser
public SectionBlockParser()
-
-
Method Details
-
accept
accept.
- Specified by:
acceptin interfaceBlockParser- Parameters:
line- text line- Returns:
trueif this class can handle this line
-
visit
visit.
- Specified by:
visitin interfaceBlockParser- Parameters:
line- a line of textsource- the source of lines- Returns:
- a block
- Throws:
ParseException- on error
-
getLevel
- Parameters:
s- "++"- Returns:
- tha level of the section
- Throws:
IllegalArgumentException- on error
-
setParaParser
Sets the paraParser.- Parameters:
paraParser-ParagraphBlockParserwith the paraParser.
-
setHrulerParser
Sets the hrulerParser.- Parameters:
hrulerParser-HRuleBlockParserwith the hrulerParser.
-
setVerbatimBlockParser
Sets the verbatimBlockParser.- Parameters:
verbatimBlockParser-VerbatimBlockParserwith the verbatimBlockParser.- Since:
- 1.1
-