Class LineWrappingHandler
java.lang.Object
com.puppycrawl.tools.checkstyle.checks.indentation.LineWrappingHandler
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 ClassesModifier and TypeClassDescriptionstatic enum
Enum to be used for test if first line's indentation should be checked or not. -
Constructor Summary
ConstructorsConstructorDescriptionLineWrappingHandler
(IndentationCheck instance) Sets values of class field, finds last node and calculates indentation level. -
Method Summary
Modifier and TypeMethodDescriptionvoid
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 Details
-
LineWrappingHandler
Sets values of class field, finds last node and calculates indentation level.- Parameters:
instance
- instance of IndentationCheck.
-
-
Method Details
-
checkIndentation
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.
-