Example usage for org.hibernate.hql.internal.ast.util ASTPrinter showAsString

List of usage examples for org.hibernate.hql.internal.ast.util ASTPrinter showAsString

Introduction

In this page you can find the example usage for org.hibernate.hql.internal.ast.util ASTPrinter showAsString.

Prototype

public String showAsString(AST ast, String header) 

Source Link

Document

Renders the AST into 'ASCII art' form and returns that string representation.

Usage

From source file:org.babyfish.hibernate.hql.XQueryTranslatorImpl.java

License:Open Source License

private static void logAST(AST ast, String message) {
    if (LOGGER.isDebugEnabled()) {
        ASTPrinter printer = new ASTPrinter(HqlTokenTypes.class);
        String astText = printer.showAsString(ast, message);
        LOGGER.debug(astText);/*from ww  w  .j ava2 s . c o  m*/
    }
}