return context;
}
};
Reference ref = new Reference(
this.getClass().getName(), refAddr);
CannotProceedException cpe = null;
CompositeName resolvedName = null;
if (environment.containsKey(NamingManager.CPE)) {
cpe = (CannotProceedException)
environment.get(NamingManager.CPE);
resolvedName = (CompositeName) cpe.getResolvedName();
// remove the last component if it is ""
// (the sign of the next naming system)
if (resolvedName != null &&
resolvedName.get(resolvedName.size() - 1)
.equals("")) //$NON-NLS-1$
{
resolvedName.remove(resolvedName.size() - 1);
}
}
else {
cpe = new CannotProceedException();
}
cpe.setEnvironment((Hashtable) environment.clone());
cpe.setAltName(name);
cpe.setAltNameCtx((DNSContext) this.clone());
cpe.setRemainingName(remainingName);
if (resolvedName == null) {
resolvedName = new CompositeName();
}
resolvedName.add(nameToLookFor.toString());
// the sign of the next naming system
resolvedName.add(""); //$NON-NLS-1$
cpe.setResolvedName(resolvedName);
cpe.setResolvedObj(ref);
return cpe;
}