final Binding<T> binding, Binder binder, final Key<T> key) {
final Binder sourcedBinder = binder.withSource(binding.getSource());
return binding.acceptTargetVisitor(new BindingTargetVisitor<T, ScopedBindingBuilder>() {
public ScopedBindingBuilder visit(InstanceBinding<? extends T> binding) {
sourcedBinder.bind(key).toInstance(binding.getInstance());
return null;
}
public ScopedBindingBuilder visit(ProviderInstanceBinding<? extends T> binding) {
return sourcedBinder.bind(key).toProvider(binding.getProviderInstance());