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

Method getNameParser

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

Source from the content-addressed store, hash-verified

375
376
377 @Override
378 public NameParser getNameParser(Name name) throws NamingException {
379
380 while ((!name.isEmpty()) && (name.get(0).isEmpty())) {
381 name = name.getSuffix(1);
382 }
383 if (name.isEmpty()) {
384 return nameParser;
385 }
386
387 NamingEntry entry = bindings.get(name.get(0));
388 if (entry == null) {
389 throw new NameNotFoundException(sm.getString("namingContext.nameNotBound", name, name.get(0)));
390 }
391
392 if (entry.type != NamingEntry.CONTEXT) {
393 throw new NotContextException(sm.getString("namingContext.contextExpected", name.get(0)));
394 }
395
396 if (name.size() > 1) {
397 return ((Context) entry.value).getNameParser(name.getSuffix(1));
398 }
399
400 return nameParser;
401
402 }
403
404
405 @Override

Callers 3

mockDirContextMethod · 0.45
getRolesMethod · 0.45
getDistinguishedNameMethod · 0.45

Calls 5

getSuffixMethod · 0.80
getMethod · 0.65
getStringMethod · 0.65
isEmptyMethod · 0.45
sizeMethod · 0.45

Tested by 1

mockDirContextMethod · 0.36