public class

SqlASTFactory

extends ASTFactory
java.lang.Object
   ↳ ASTFactory
     ↳ org.hibernate.hql.ast.SqlASTFactory

Class Overview

Custom AST factory the intermediate tree that causes ANTLR to create specialized AST nodes, given the AST node type (from HqlSqlTokenTypes). HqlSqlWalker registers this factory with itself when it is initialized.

Summary

Public Constructors
SqlASTFactory(HqlSqlWalker walker)
Create factory with a specific mapping from token type to Java AST node type.
Public Methods
Class getASTNodeType(int tokenType)
Returns the class for a given token type (a.k.a.
Protected Methods
AST create(Class c)
Actually instantiate the AST node.
AST createUsingCtor(Token token, String className)
[Expand]
Inherited Methods
From class java.lang.Object

Public Constructors

public SqlASTFactory (HqlSqlWalker walker)

Create factory with a specific mapping from token type to Java AST node type. Your subclasses of ASTFactory can override and reuse the map stuff.

Public Methods

public Class getASTNodeType (int tokenType)

Returns the class for a given token type (a.k.a. AST node type).

Parameters
tokenType The token type.
Returns
  • Class - The AST node class to instantiate.

Protected Methods

protected AST create (Class c)

Actually instantiate the AST node.

Parameters
c The class to instantiate.
Returns
  • The instantiated and initialized node.

protected AST createUsingCtor (Token token, String className)