View Javadoc
1   package com.puppycrawl.tools.checkstyle.checks.sizes.methodlength;
2   
3   import com.puppycrawl.tools.checkstyle.api.DetailAST;
4   import com.puppycrawl.tools.checkstyle.api.TokenTypes;
5   
6   public class InputMethodLengthComments {
7       public void visitToken(DetailAST ast) {
8   
9           final DetailAST openingBrace = ast.findFirstToken(TokenTypes.SLIST);
10  
11          if (openingBrace != null) {
12              final DetailAST closingBrace =
13                      openingBrace.findFirstToken(TokenTypes.RCURLY);
14          }
15  
16      }
17  
18      public DetailAST visit(DetailAST ast) {
19          final DetailAST openingBrace = ast.findFirstToken(TokenTypes.SLIST);
20          DetailAST closingBrace = null;
21  
22          if (openingBrace != null) {
23              closingBrace = openingBrace.findFirstToken(TokenTypes.RCURLY);
24          }
25          return closingBrace;
26      }
27  }