Class AptParser.Block

    • Field Summary

      Fields 
      Modifier and Type Field Description
      protected int indent
      indent.
      protected java.lang.String text
      text.
      protected int textLength
      textLength.
      protected int type
      type.
    • Constructor Summary

      Constructors 
      Constructor Description
      Block​(int type, int indent)
      Constructor.
      Block​(int type, int indent, java.lang.String firstLine)
      Constructor.
    • Field Detail

      • type

        protected int type
        type.
      • indent

        protected int indent
        indent.
      • text

        protected java.lang.String text
        text.
      • textLength

        protected int textLength
        textLength.
    • Constructor Detail

      • Block

        Block​(int type,
              int indent)
        throws AptParseException
        Constructor.
        Parameters:
        type - the block type.
        indent - indent.
        Throws:
        AptParseException - AptParseException
      • Block

        Block​(int type,
              int indent,
              java.lang.String firstLine)
        throws AptParseException
        Constructor.
        Parameters:
        type - type.
        indent - indent.
        firstLine - the first line.
        Throws:
        AptParseException - AptParseException
    • Method Detail

      • getType

        public final int getType()
        Return the block type.
        Returns:
        int
      • getIndent

        public final int getIndent()
        Return the block indent.
        Returns:
        int
      • traverseText

        protected void traverseText​(int begin)
                             throws AptParseException
        Traverse the text.
        Parameters:
        begin - offset.
        Throws:
        AptParseException - if something goes wrong.
      • traverseText

        protected void traverseText​(int begin,
                                    int end)
                             throws AptParseException
        Traverse the text.
        Parameters:
        begin - offset.
        end - offset.
        Throws:
        AptParseException - if something goes wrong.
      • skipLeadingBullets

        protected int skipLeadingBullets()
        Skip spaces.
        Returns:
        int.
      • skipFromLeftToRightBracket

        protected int skipFromLeftToRightBracket​(int i)
                                          throws AptParseException
        Skip brackets.
        Parameters:
        i - offset.
        Returns:
        int.
        Throws:
        AptParseException - if something goes wrong.
      • skipSpaceFrom

        protected final int skipSpaceFrom​(int i)
        Skip spaces.
        Parameters:
        i - offset.
        Returns:
        int.