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

Method listBindings

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

Source from the content-addressed store, hash-verified

269
270
271 @Override
272 public NamingEnumeration<Binding> listBindings(Name name) throws NamingException {
273 // Removing empty parts
274 while ((!name.isEmpty()) && (name.get(0).isEmpty())) {
275 name = name.getSuffix(1);
276 }
277 if (name.isEmpty()) {
278 return new NamingContextBindingsEnumeration(bindings.values().iterator(), this);
279 }
280
281 NamingEntry entry = bindings.get(name.get(0));
282
283 if (entry == null) {
284 throw new NameNotFoundException(sm.getString("namingContext.nameNotBound", name, name.get(0)));
285 }
286
287 if (entry.type != NamingEntry.CONTEXT) {
288 throw new NamingException(sm.getString("namingContext.contextExpected", name.get(0)));
289 }
290 return ((Context) entry.value).listBindings(name.getSuffix(1));
291 }
292
293
294 @Override

Callers 4

doGetMethod · 0.45
createMBeansMethod · 0.45
destroyMBeansMethod · 0.45
printResourcesMethod · 0.45

Calls 6

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

Tested by 1

doGetMethod · 0.36