@Override
  public void visitToken(DetailAST ast) {
    DetailAST modifiers = ast.findFirstToken(TokenTypes.MODIFIERS);
    if (modifiers.findFirstToken(TokenTypes.LITERAL_PRIVATE) != null) {
      DetailAST annotation = modifiers.findFirstToken(TokenTypes.ANNOTATION);
      while (annotation != null) {
        DetailAST name = annotation.findFirstToken(TokenTypes.IDENT);
        if (name != null && ANNOTATION_NAME.equals(name.getText())) {
          log(ast.getLineNo(), MSG_TRANSACTIONAL_ON_PRIVATE_METHOD);
          break;
        }
        annotation = annotation.getNextSibling();
      }
    }
  }
Detects private methods annotated as <code>Transactional</code>.
See https://github.com/google/guice/wiki/Transactions for why this should be
avoided.
ambari-utility/src/main/java/org/apache/ambari/checkstyle/AvoidTransactionalOnPrivateMethodsCheck.java