1 57 58 package com.sun.org.apache.xerces.internal.util; 59 60 61 72 73 public final class ShadowedSymbolTable 74 extends SymbolTable { 75 76 80 81 protected SymbolTable fSymbolTable; 82 83 87 88 public ShadowedSymbolTable(SymbolTable symbolTable) { 89 fSymbolTable = symbolTable; 90 } 92 96 104 public String addSymbol(String symbol) { 105 106 if (fSymbolTable.containsSymbol(symbol)) { 107 return fSymbolTable.addSymbol(symbol); 108 } 109 return super.addSymbol(symbol); 110 111 } 113 123 public String addSymbol(char[] buffer, int offset, int length) { 124 125 if (fSymbolTable.containsSymbol(buffer, offset, length)) { 126 return fSymbolTable.addSymbol(buffer, offset, length); 127 } 128 return super.addSymbol(buffer, offset, length); 129 130 } 132 140 public int hash(String symbol) { 141 return fSymbolTable.hash(symbol); 142 } 144 155 public int hash(char[] buffer, int offset, int length) { 156 return fSymbolTable.hash(buffer, offset, length); 157 } 159 } | Popular Tags |