Comment #2 on issue 514 by sberlin: Do we need
Injector.getExistingBinding()?
http://code.google.com/p/google-guice/issues/detail?id=514
FYI, I removed the use of this from AssistedInject, so AssistedInject will
continue to work if this is removed. I'm still a fan of keeping it,
though, because the only other option doing what getExistingBindings does
is:
{
do {
Binding binding = injector.getAllBindings().get(key);
if(binding != null) {
return binding;
} else {
injector = injector.getParent();
}
} while(injector != null);
return null;
}
where getAllBindings has to iterate over all the JIT bindings and copy
them... and it's ugly that you have to consider the parent injectors.
FWIW, there's only a single use of the method internally... I'll talk to
the person using it to see what they think also.
--
You received this message because you are subscribed to the Google Groups
"google-guice-dev" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/google-guice-dev?hl=en.