1 package com.puppycrawl.tools.checkstyle.checks.indentation; 20 21 import com.puppycrawl.tools.checkstyle.api.DetailAST; 22 import com.puppycrawl.tools.checkstyle.api.TokenTypes; 23 24 29 public class DoWhileHandler extends BlockParentHandler 30 { 31 39 public DoWhileHandler(IndentationCheck aIndentCheck, 40 DetailAST aAst, ExpressionHandler aParent) 41 { 42 super(aIndentCheck, "do..while", aAst, aParent); 43 } 44 45 48 private void checkCondExpr() 49 { 50 final DetailAST condAst = (DetailAST) getMainAst() 51 .findFirstToken(TokenTypes.LPAREN).getNextSibling(); 52 checkExpressionSubtree(condAst, getLevel(), false, false); 53 } 54 55 58 public void checkIndentation() 59 { 60 super.checkIndentation(); 61 checkCondExpr(); 63 } 64 } 65 | Popular Tags |