Class LineWrappingHandler


  • public class LineWrappingHandler
    extends java.lang.Object
    This class checks line-wrapping into definitions and expressions. The line-wrapping indentation should be not less than value of the lineWrappingIndentation parameter.
    • Constructor Detail

      • LineWrappingHandler

        public LineWrappingHandler​(IndentationCheck instance)
        Sets values of class field, finds last node and calculates indentation level.
        Parameters:
        instance - instance of IndentationCheck.
    • Method Detail

      • checkIndentation

        public void checkIndentation​(DetailAST firstNode,
                                     DetailAST lastNode)
        Checks line wrapping into expressions and definitions using property 'lineWrappingIndentation'.
        Parameters:
        firstNode - First node to start examining.
        lastNode - Last node to examine inclusively.
      • checkIndentation

        public void checkIndentation​(DetailAST firstNode,
                                     DetailAST lastNode,
                                     int indentLevel,
                                     int startIndent,
                                     LineWrappingHandler.LineWrappingOptions ignoreFirstLine)
        Checks line wrapping into expressions and definitions.
        Parameters:
        firstNode - First node to start examining.
        lastNode - Last node to examine inclusively.
        indentLevel - Indentation all wrapped lines should use.
        startIndent - Indentation first line before wrapped lines used.
        ignoreFirstLine - Test if first line's indentation should be checked or not.