private static boolean isApiOperation(DetailAST ast) {
    DetailAST modifiers = ast.findFirstToken(TokenTypes.MODIFIERS);
    if (modifiers.findFirstToken(TokenTypes.LITERAL_PRIVATE) != null) {
      return false;
    }

    DetailAST annotation = modifiers.findFirstToken(TokenTypes.ANNOTATION);
    while (annotation != null) {
      DetailAST name = annotation.findFirstToken(TokenTypes.IDENT);
      if (name != null && API_ANNOTATIONS.contains(name.getText())) {
        return true;
      }
      annotation = annotation.getNextSibling();
    }

    return false;
  }
REST API operations should either be documented, or marked to be ignored.
ambari-utility/src/main/java/org/apache/ambari/checkstyle/UndocumentedRestApiOperationCheck.java