NameToScope nts = autowireInternal.get(instanceInterface);
if (nts != null) {
try {
return instanceInterface.cast(nts.getScopeContext().getInstance(nts.getName()));
} catch (TargetException e) {
AutowireResolutionException ae = new AutowireResolutionException("Autowire instance not found", e);
ae.addContextName(getName());
throw ae;
}
} else if (autowireContext != null) {
try {
// resolve to parent