1 23 24 25 26 31 32 package com.sun.jdo.spi.persistence.support.ejb.ejbqlc; 33 34 import java.util.Map ; 35 import java.util.HashMap ; 36 37 42 public class SymbolTable 43 { 44 47 protected Map symbols = new HashMap (); 48 49 60 public Object declare(String ident, Object decl) 61 { 62 Object old = symbols.get(ident); 63 if (old == null) { 64 symbols.put(ident.toUpperCase(), decl); 65 } 66 return old; 67 } 68 69 75 public boolean isDeclared(String ident) 76 { 77 return (getDeclaration(ident) != null); 78 } 79 80 88 public Object getDeclaration(String ident) 89 { 90 return symbols.get(ident.toUpperCase()); 91 } 92 93 } 94 | Popular Tags |