sberlin commented on revision r1195 in project google-guice.
Details are at http://code.google.com/p/google-guice/source/detail?r=1195

General Comment:
Hmm -- good point. My thinking was that if it was an implementation detail of the other method, it wouldn't be possible to expose the fact the returned module was effectively a PrivateModule. But I'm not sure if that's all that necessary. It's definitely possible to do this without a new public method. The top of RealOverridenModuleBuilder.configure() just changes to look like:
           final Binder binder;
          List<Element> baseElements = Elements.getElements(baseModules);

if(baseElements.size() == 1 && Iterables.getOnlyElement(baseElements) instanceof PrivateElements) { PrivateElements privateElements = (PrivateElements)Iterables.getOnlyElement(baseElements); PrivateBinder privateBinder = binder().newPrivateBinder().withSource(privateElements.getSource());
            for(Key exposed : privateElements.getExposedKeys()) {
privateBinder.withSource(privateElements.getExposedSource(exposed)).expose(exposed);
            }
            binder = privateBinder;
            baseElements = privateElements.getElements();
          } else {
            binder = binder();
          }

final LinkedHashSet<Element> elements = new LinkedHashSet<Element>(baseElements);

and references in that method to binder() instead refer to 'binder'. You prefer to do it w/o the public method?

Respond to these comments at http://code.google.com/p/google-guice/source/detail?r=1195
--
You received this message because you starred this review, or because
your project has directed all notifications to a mailing list that you
subscribe to.
You may adjust your review notification preferences at:
http://code.google.com/hosting/settings

--
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.

Reply via email to