Class SymbolTable
- java.lang.Object
-
- com.sun.jdo.spi.persistence.support.ejb.ejbqlc.SymbolTable
-
public class SymbolTable extends Object
The symbol table handling declared identifies.- Author:
- Michael Bouschen
-
-
Constructor Summary
Constructors Constructor Description SymbolTable()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Object
declare(String ident, Object decl)
This method adds the specified identifier to this SymbolTable.Object
getDeclaration(String ident)
Checks the symbol table for the actual declaration of the specified identifier.boolean
isDeclared(String ident)
Checks whether the specified identifier is declared.
-
-
-
Field Detail
-
symbols
protected Map symbols
The table of declared identifier (symbols).
-
-
Method Detail
-
declare
public Object declare(String ident, 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. Otherwisenull
is returned.- Parameters:
ident
- identifier to be declareddecl
- new definition of identifier- Returns:
- the old definition if the identifier was already declared;
null
otherwise
-
isDeclared
public boolean isDeclared(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 Object getDeclaration(String ident)
Checks the symbol table for the actual declaration of the specified identifier. The method returns the declaration object if available ornull
for an undeclared identifier.- Parameters:
ident
- the name of identifier- Returns:
- the declaration object if ident is declared;
null
otherise.
-
-