Class SectionBlock

  • All Implemented Interfaces:
    Block

    public class SectionBlock
    extends AbstractFatherBlock
    Block that represents a section
    Version:
    $Id$
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private int level
      private java.lang.String title
    • Constructor Summary

      Constructors 
      Constructor Description
      SectionBlock​(java.lang.String title, int level, Block[] blocks)
      Creates the SectionBlock.
    • Field Detail

      • title

        private final java.lang.String title
      • level

        private final int level
    • Constructor Detail

      • SectionBlock

        public SectionBlock​(java.lang.String title,
                            int level,
                            Block[] blocks)
        Creates the SectionBlock.
        Parameters:
        title - the section title, cannot be null
        level - the section level: 0 < level < 6
        blocks - child blocks, cannot be null
    • Method Detail

      • before

        final void before​(Sink sink)
        method called before traversing the childs
        Specified by:
        before in class AbstractFatherBlock
        Parameters:
        sink - a sink to fill
      • after

        final void after​(Sink sink)
        method called after traversing the childs
        Specified by:
        after in class AbstractFatherBlock
        Parameters:
        sink - a sink to fill
      • sectionStart

        private void sectionStart​(Sink sink)
        call to sink.section()
        Parameters:
        sink - sink
      • sectionEnd

        private void sectionEnd​(Sink sink)
        call to sink.section_()
        Parameters:
        sink - sink
      • invokeVoidVoid

        private void invokeVoidVoid​(Sink sink,
                                    java.lang.String name)
        Let you call sink's methods that returns null and have no parameters.
        Parameters:
        sink - the Sink
        name - the name of the method to call
      • getLevel

        public final int getLevel()
        Returns the level.
        Returns:
        int with the level.
      • getTitle

        public final java.lang.String getTitle()
        Returns the title.
        Returns:
        String with the title.
      • toString

        public final java.lang.String toString()
        Overrides:
        toString in class java.lang.Object
      • sectionTitle

        private void sectionTitle​(Sink sink)
        Parameters:
        sink -
      • sectionTitle_

        private void sectionTitle_​(Sink sink)
        Parameters:
        sink -