Search in sources :

Example 6 with Scope

use of com.puppycrawl.tools.checkstyle.api.Scope in project checkstyle by checkstyle.

the class JavadocMethodCheck method processAST.

@Override
protected final void processAST(DetailAST ast) {
    final Scope theScope = calculateScope(ast);
    if (shouldCheck(ast, theScope)) {
        final FileContents contents = getFileContents();
        final TextBlock textBlock = contents.getJavadocBefore(ast.getLineNo());
        if (textBlock == null) {
            if (!isMissingJavadocAllowed(ast)) {
                log(ast, MSG_JAVADOC_MISSING);
            }
        } else {
            checkComment(ast, textBlock);
        }
    }
}
Also used : FileContents(com.puppycrawl.tools.checkstyle.api.FileContents) Scope(com.puppycrawl.tools.checkstyle.api.Scope) TextBlock(com.puppycrawl.tools.checkstyle.api.TextBlock)

Aggregations

Scope (com.puppycrawl.tools.checkstyle.api.Scope)6 DetailAST (com.puppycrawl.tools.checkstyle.api.DetailAST)5 FileContents (com.puppycrawl.tools.checkstyle.api.FileContents)1 TextBlock (com.puppycrawl.tools.checkstyle.api.TextBlock)1