Class Indexer

All Implemented Interfaces:
BindingScopingVisitor<Object>, BindingTargetVisitor<Object,Indexer.IndexedBinding>

Visits bindings to return a IndexedBinding that can be used to emulate the binding deduplication that Guice internally performs.

Note: simply using equals/hashCode on the BindingImpls doesn't work because they all have unique annotations. This works around that by reimplementing equality semantics that ignores Element.uniqueId(). A better solution might be to introduce the idea of an 'anonymous' binding to guice, that might support this usecase directly.