Class LineWrappingHandler
- java.lang.Object
-
- com.puppycrawl.tools.checkstyle.checks.indentation.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.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
LineWrappingHandler.LineWrappingOptions
Enum to be used for test if first line's indentation should be checked or not.
-
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, int startIndent, LineWrappingHandler.LineWrappingOptions 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, 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.
-
-