MCPcopy Create free account
hub / github.com/apache/tomcat / list

Method list

java/org/apache/naming/NamingContext.java:242–262  ·  view source on GitHub ↗
(Name name)

Source from the content-addressed store, hash-verified

240
241
242 @Override
243 public NamingEnumeration<NameClassPair> list(Name name) throws NamingException {
244 // Removing empty parts
245 while ((!name.isEmpty()) && (name.get(0).isEmpty())) {
246 name = name.getSuffix(1);
247 }
248 if (name.isEmpty()) {
249 return new NamingContextEnumeration(bindings.values().iterator());
250 }
251
252 NamingEntry entry = bindings.get(name.get(0));
253
254 if (entry == null) {
255 throw new NameNotFoundException(sm.getString("namingContext.nameNotBound", name, name.get(0)));
256 }
257
258 if (entry.type != NamingEntry.CONTEXT) {
259 throw new NamingException(sm.getString("namingContext.contextExpected", name.get(0)));
260 }
261 return ((Context) entry.value).list(name.getSuffix(1));
262 }
263
264
265 @Override

Callers

nothing calls this directly

Calls 7

getSuffixMethod · 0.80
getMethod · 0.65
getStringMethod · 0.65
listMethod · 0.65
isEmptyMethod · 0.45
iteratorMethod · 0.45
valuesMethod · 0.45

Tested by

no test coverage detected