public class LineWrappingHandler extends java.lang.Object
| Modifier and Type | Class and Description |
|---|---|
static class |
LineWrappingHandler.LineWrappingOptions
Enum to be used for test if first line's indentation should be checked or not.
|
| Constructor and Description |
|---|
LineWrappingHandler(IndentationCheck instance)
Sets values of class field, finds last node and calculates indentation level.
|
| Modifier and Type | Method and Description |
|---|---|
void |
checkForAnnotationIndentation(java.util.NavigableMap<java.lang.Integer,DetailAST> firstNodesOnLines,
int indentLevel)
Checks for annotation indentation.
|
static boolean |
checkForMethodLparenNewLine(DetailAST node)
Checks whether the method lparen starts from a new line or not.
|
static boolean |
checkForNullParameterChild(DetailAST node)
Checks whether parameter node has any child or not.
|
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.
|
public LineWrappingHandler(IndentationCheck instance)
instance - instance of IndentationCheck.public void checkIndentation(DetailAST firstNode, DetailAST lastNode)
firstNode - First node to start examining.lastNode - Last node to examine inclusively.public void checkIndentation(DetailAST firstNode, DetailAST lastNode, int indentLevel, int startIndent, LineWrappingHandler.LineWrappingOptions ignoreFirstLine)
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.public void checkForAnnotationIndentation(java.util.NavigableMap<java.lang.Integer,DetailAST> firstNodesOnLines, int indentLevel)
firstNodesOnLines - the nodes which are present in the beginning of each line.indentLevel - line wrapping indentation.public static boolean checkForNullParameterChild(DetailAST node)
node - the node for which to check.public static boolean checkForMethodLparenNewLine(DetailAST node)
node - the node for which to check.Copyright © 2001-2021. All Rights Reserved.