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 CatchHandler extends BlockParentHandler 30 { 31 39 public CatchHandler(IndentationCheck aIndentCheck, 40 DetailAST aAst, ExpressionHandler aParent) 41 { 42 super(aIndentCheck, "catch", aAst, aParent); 43 } 44 45 50 protected boolean toplevelMustStartLine() 51 { 52 return false; 53 } 54 55 58 private void checkCondExpr() 59 { 60 final DetailAST condAst = (DetailAST) 61 getMainAst().findFirstToken(TokenTypes.LPAREN).getNextSibling(); 62 checkExpressionSubtree(condAst, getLevel(), false, false); 63 } 64 65 68 public void checkIndentation() 69 { 70 super.checkIndentation(); 71 checkCondExpr(); 72 } 73 } 74 | Popular Tags |