Class LineWrappingHandler
- java.lang.Object
-
- com.puppycrawl.tools.checkstyle.checks.indentation.LineWrappingHandler
-
public class LineWrappingHandler extends Object
This class checks line-wrapping into definitions and expressions. The line-wrapping indentation should be not less then value of the lineWrappingIndentation parameter.- Author:
- maxvetrenko, liscju
-
-
Constructor Summary
Constructors Constructor Description LineWrappingHandler(IndentationCheck instance)
Sets values of class field, finds last node and calculates indentation level.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
checkIndentation(DetailAST firstNode, DetailAST lastNode)
Checks line wrapping into expressions and definitions using property 'lineWrappingIndentation'.void
checkIndentation(DetailAST firstNode, DetailAST lastNode, int indentLevel)
Checks line wrapping into expressions and definitions.void
checkIndentation(DetailAST firstNode, DetailAST lastNode, int indentLevel, int startIndent, boolean ignoreFirstLine)
Checks line wrapping into expressions and definitions.
-
-
-
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)
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.
-
checkIndentation
public void checkIndentation(DetailAST firstNode, DetailAST lastNode, int indentLevel, int startIndent, boolean 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.
-
-