Class SectionBlockParser

java.lang.Object
org.apache.maven.doxia.module.twiki.parser.SectionBlockParser
All Implemented Interfaces:
BlockParser

public class SectionBlockParser extends Object implements BlockParser
Parse looking for sections
  • Field Details

  • Constructor Details

    • SectionBlockParser

      public SectionBlockParser()
  • Method Details

    • accept

      public final boolean accept(String line)

      accept.

      Specified by:
      accept in interface BlockParser
      Parameters:
      line - text line
      Returns:
      true if this class can handle this line
    • visit

      public final Block visit(String line, ByLineSource source) throws ParseException

      visit.

      Specified by:
      visit in interface BlockParser
      Parameters:
      line - a line of text
      source - the source of lines
      Returns:
      a block
      Throws:
      ParseException - on error
    • getLevel

      static int getLevel(String s) throws IllegalArgumentException
      Parameters:
      s - "++"
      Returns:
      tha level of the section
      Throws:
      IllegalArgumentException - on error
    • setParaParser

      public final void setParaParser(ParagraphBlockParser paraParser)
      Sets the paraParser.
      Parameters:
      paraParser - ParagraphBlockParser with the paraParser.
    • setHrulerParser

      public final void setHrulerParser(HRuleBlockParser hrulerParser)
      Sets the hrulerParser.
      Parameters:
      hrulerParser - HRuleBlockParser with the hrulerParser.
    • setVerbatimBlockParser

      public final void setVerbatimBlockParser(VerbatimBlockParser verbatimBlockParser)
      Sets the verbatimBlockParser.
      Parameters:
      verbatimBlockParser - VerbatimBlockParser with the verbatimBlockParser.
      Since:
      1.1