aboutsummaryrefslogtreecommitdiff
path: root/src/test/resources/com/puppycrawl/tools/checkstyle/checks/sizes/methodlength/InputMethodLengthComments.java
blob: 8fbcc0e1d2dc0a5556a3dc6abe66fa72c7361c85 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
package com.puppycrawl.tools.checkstyle.checks.sizes.methodlength;

import com.puppycrawl.tools.checkstyle.api.DetailAST;
import com.puppycrawl.tools.checkstyle.api.TokenTypes;

public class InputMethodLengthComments {
    public void visitToken(DetailAST ast) {

        final DetailAST openingBrace = ast.findFirstToken(TokenTypes.SLIST);

        if (openingBrace != null) {
            final DetailAST closingBrace =
                    openingBrace.findFirstToken(TokenTypes.RCURLY);
        }

    }

    public DetailAST visit(DetailAST ast) {
        final DetailAST openingBrace = ast.findFirstToken(TokenTypes.SLIST);
        DetailAST closingBrace = null;

        if (openingBrace != null) {
            closingBrace = openingBrace.findFirstToken(TokenTypes.RCURLY);
        }
        return closingBrace;
    }
}