85 86 public Klass find(int index, long hash, Symbol className, Oop classLoader, Oop protectionDomain) { 87 DictionaryEntry entry = getEntry(index, hash, className, classLoader); 88 if (entry != null && entry.isValidProtectionDomain(protectionDomain)) { 89 return entry.klass(); 90 } 91 return null; 92 } 93 94 // - Internals only below this point 95 96 private DictionaryEntry getEntry(int index, long hash, Symbol className, Oop classLoader) { 97 for (DictionaryEntry entry = (DictionaryEntry) bucket(index); entry != null; 98 entry = (DictionaryEntry) entry.next()) { 99 if (entry.hash() == hash && entry.equals(className, classLoader)) { 100 return entry; 101 } 102 } 103 return null; 104 } 105 } | 85 86 public Klass find(int index, long hash, Symbol className, Oop classLoader, Oop protectionDomain) { 87 DictionaryEntry entry = getEntry(index, hash, className, classLoader); 88 if (entry != null && entry.isValidProtectionDomain(protectionDomain)) { 89 return entry.klass(); 90 } 91 return null; 92 } 93 94 // - Internals only below this point 95 96 private DictionaryEntry getEntry(int index, long hash, Symbol className, Oop classLoader) { 97 for (DictionaryEntry entry = (DictionaryEntry) bucket(index); entry != null; 98 entry = (DictionaryEntry) entry.next()) { 99 if (entry.hash() == hash && entry.equals(className, classLoader)) { 100 return entry; 101 } 102 } 103 return null; 104 } 105 106 public boolean contains(Klass c, Oop classLoader) { 107 long hash = computeHash(c.getName(), classLoader); 108 int index = hashToIndex(hash); 109 110 for (DictionaryEntry entry = (DictionaryEntry) bucket(index); entry != null; 111 entry = (DictionaryEntry) entry.next()) { 112 if (entry.literalValue().equals(c.getAddress())) { 113 return true; 114 } 115 } 116 return false; 117 } 118 } |