1 16 17 package org.apache.xerces.util; 18 19 20 31 32 public final class ShadowedSymbolTable 33 extends SymbolTable { 34 35 39 40 protected SymbolTable fSymbolTable; 41 42 46 47 public ShadowedSymbolTable(SymbolTable symbolTable) { 48 fSymbolTable = symbolTable; 49 } 51 55 63 public String addSymbol(String symbol) { 64 65 if (fSymbolTable.containsSymbol(symbol)) { 66 return fSymbolTable.addSymbol(symbol); 67 } 68 return super.addSymbol(symbol); 69 70 } 72 82 public String addSymbol(char[] buffer, int offset, int length) { 83 84 if (fSymbolTable.containsSymbol(buffer, offset, length)) { 85 return fSymbolTable.addSymbol(buffer, offset, length); 86 } 87 return super.addSymbol(buffer, offset, length); 88 89 } 91 99 public int hash(String symbol) { 100 return fSymbolTable.hash(symbol); 101 } 103 114 public int hash(char[] buffer, int offset, int length) { 115 return fSymbolTable.hash(buffer, offset, length); 116 } 118 } | Popular Tags |