|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.puppycrawl.tools.checkstyle.checks.indentation.ExpressionHandler com.puppycrawl.tools.checkstyle.checks.indentation.BlockParentHandler
Handler for parents of blocks ('if', 'else', 'while', etc).
The "block" handler classes use a common superclass BlockParentHandler, employing the Template Method pattern.
Constructor Summary | |
BlockParentHandler(IndentationCheck aIndentCheck,
java.lang.String aName,
DetailAST aAst,
ExpressionHandler aParent)
Construct an instance of this handler with the given indentation check, name, abstract syntax tree, and parent handler. |
Method Summary | |
void |
checkIndentation()
Check the indentation of the expression we are handling. |
protected void |
checkLCurly()
Check the indentation of the left curly brace. |
protected void |
checkLParen()
Check the indentation of the left parenthesis. |
protected void |
checkRCurly()
Check the indentation of the right curly brace. |
protected void |
checkRParen()
Check the indentation of the right parenthesis. |
protected void |
checkToplevelToken()
Check the indent of the top level token. |
protected boolean |
childrenMayNest()
Determines if child elements within the expression may be nested. |
protected IndentLevel |
getChildrenExpectedLevel()
|
protected DetailAST |
getLCurly()
Get the left curly brace portion of the expression we are handling. |
protected DetailAST |
getListChild()
Get the child element representing the list of statements. |
protected DetailAST |
getLParen()
Get the left parenthesis portion of the expression we are handling. |
protected DetailAST |
getNonlistChild()
Get the child element that is not a list of statements. |
protected DetailAST |
getRCurly()
Get the right curly brace portion of the expression we are handling. |
protected DetailAST |
getRParen()
Get the right parenthesis portion of the expression we are handling. |
protected DetailAST |
getToplevelAST()
Get the top level expression being managed by this handler. |
protected boolean |
hasCurlys()
Determines if this block expression has curly braces. |
protected boolean |
rcurlyMustStart()
Determines if the right curly brace must be at the start of the line. |
protected boolean |
toplevelMustStartLine()
Determines if the top level token must start the line. |
Methods inherited from class com.puppycrawl.tools.checkstyle.checks.indentation.ExpressionHandler |
checkChildren, checkExpressionSubtree, checkLinesIndent, checkModifiers, expandedTabsColumnNo, findSubtreeLines, getBasicOffset, getBraceAdjustement, getFirstLine, getIndentCheck, getLevel, getLevelImpl, getLineStart, getLineStart, getMainAst, getParent, logError, logError, shouldIncreaseIndent, startsLine, suggestedChildLevel |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public BlockParentHandler(IndentationCheck aIndentCheck, java.lang.String aName, DetailAST aAst, ExpressionHandler aParent)
aIndentCheck
- the indentation checkaName
- the name of the handleraAst
- the abstract syntax treeaParent
- the parent handlerMethod Detail |
protected DetailAST getToplevelAST()
protected void checkToplevelToken()
protected boolean toplevelMustStartLine()
protected boolean hasCurlys()
protected DetailAST getLCurly()
protected DetailAST getRCurly()
protected void checkLCurly()
protected boolean rcurlyMustStart()
protected boolean childrenMayNest()
protected void checkRCurly()
protected DetailAST getNonlistChild()
protected DetailAST getListChild()
protected DetailAST getRParen()
protected DetailAST getLParen()
protected void checkRParen()
protected void checkLParen()
public void checkIndentation()
checkIndentation
in class ExpressionHandler
protected IndentLevel getChildrenExpectedLevel()
|
Back to the Checkstyle Home Page | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |