com.sun.jdo.spi.persistence.support.ejb.ejbqlc
Class SymbolTable

java.lang.Object
  extended by com.sun.jdo.spi.persistence.support.ejb.ejbqlc.SymbolTable

public class SymbolTable
extends java.lang.Object

The symbol table handling declared identifies.

Author:
Michael Bouschen

Field Summary
protected  java.util.Map symbols
          The table of declared identifier (symbols).
 
Constructor Summary
SymbolTable()
           
 
Method Summary
 java.lang.Object declare(java.lang.String ident, java.lang.Object decl)
          This method adds the specified identifier to this SymbolTable.
 java.lang.Object getDeclaration(java.lang.String ident)
          Checks the symbol table for the actual declaration of the specified identifier.
 boolean isDeclared(java.lang.String ident)
          Checks whether the specified identifier is declared.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

symbols

protected java.util.Map symbols
The table of declared identifier (symbols).

Constructor Detail

SymbolTable

public SymbolTable()
Method Detail

declare

public java.lang.Object declare(java.lang.String ident,
                                java.lang.Object decl)
This method adds the specified identifier to this SymbolTable. The specified decl object provides details anbout the declaration. If this SymbolTable already defines an identifier with the same name, the SymbolTable is not changed and the existing declaration is returned. Otherwise null is returned.

Parameters:
ident - identifier to be declared
decl - new definition of identifier
Returns:
the old definition if the identifier was already declared; null otherwise

isDeclared

public boolean isDeclared(java.lang.String ident)
Checks whether the specified identifier is declared.

Parameters:
ident - the name of identifier to be tested
Returns:
true if the identifier is declared; false otherwise.

getDeclaration

public java.lang.Object getDeclaration(java.lang.String ident)
Checks the symbol table for the actual declaration of the specified identifier. The method returns the declaration object if available or null for an undeclared identifier.

Parameters:
ident - the name of identifier
Returns:
the declaration object if ident is declared; null otherise.


Copyright © 2012 GlassFish Community. All Rights Reserved.