Class ElseHandler
- java.lang.Object
-
- com.puppycrawl.tools.checkstyle.checks.indentation.AbstractExpressionHandler
-
- com.puppycrawl.tools.checkstyle.checks.indentation.BlockParentHandler
-
- com.puppycrawl.tools.checkstyle.checks.indentation.ElseHandler
-
public class ElseHandler extends BlockParentHandler
Handler for else blocks.
-
-
Constructor Summary
Constructors Constructor Description ElseHandler(IndentationCheck indentCheck, DetailAST ast, AbstractExpressionHandler parent)
Construct an instance of this handler with the given indentation check, abstract syntax tree, and parent handler.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
checkTopLevelToken()
Check the indent of the top level token.protected DetailAST
getNonListChild()
Get the child element that is not a list of statements.-
Methods inherited from class com.puppycrawl.tools.checkstyle.checks.indentation.BlockParentHandler
canChildrenBeNested, checkIndentation, curlyIndent, getCheckedChildren, getChildrenExpectedIndent, getLeftCurly, getListChild, getRightCurly, getSuggestedChildIndent, getTopLevelAst
-
Methods inherited from class com.puppycrawl.tools.checkstyle.checks.indentation.AbstractExpressionHandler
checkChildren, checkExpressionSubtree, checkLeftParen, checkModifiers, checkRightParen, checkWrappingIndentation, checkWrappingIndentation, expandedTabsColumnNo, findSubtreeAst, getBasicOffset, getBraceAdjustment, getFirstAstNode, getFirstLine, getFirstToken, getIndent, getIndentCheck, getIndentImpl, getLineStart, getLineStart, getMainAst, getParent, isOnStartOfLine, logError, logError, shouldIncreaseIndent
-
-
-
-
Constructor Detail
-
ElseHandler
public ElseHandler(IndentationCheck indentCheck, DetailAST ast, AbstractExpressionHandler parent)
Construct an instance of this handler with the given indentation check, abstract syntax tree, and parent handler.- Parameters:
indentCheck
- the indentation checkast
- the abstract syntax treeparent
- the parent handler
-
-
Method Detail
-
checkTopLevelToken
protected void checkTopLevelToken()
Description copied from class:BlockParentHandler
Check the indent of the top level token.- Overrides:
checkTopLevelToken
in classBlockParentHandler
-
getNonListChild
protected DetailAST getNonListChild()
Description copied from class:BlockParentHandler
Get the child element that is not a list of statements.- Overrides:
getNonListChild
in classBlockParentHandler
- Returns:
- the non-list child element
-
-