Open GoogleCodeExporter opened 9 years ago
I'm sorry, neither BindingImpl nor Scoping are public APIs. In theory we could
add a public API method to
binding to get the scoping annotation, but that wouldn't work for bindings that
were bound using a scope
instance rather than a scope annotation. Consider this is perfectly legal:
bindScope(ScopeAnnotationOne.class, someScope);
bindScope(ScopeAnnotationTwo.class, someScope);
bind(Foo.class).in(someScope);
What scope annotation would that return?
If you'd to programatically check how a binding is scoped, please use
Binding.acceptScopingVisitor(). You may
also need to follow multiple layers of LinkedBindings.
Original comment by limpbizkit
on 26 Apr 2009 at 8:22
Original issue reported on code.google.com by
james.st...@gmail.com
on 7 Apr 2009 at 7:36