The Guice documentation has an Untargetted Binding example like:
bind(MyConcreteClass.class) .annotatedWith(Names.named("foo")) .to(MyConcreteClass.class);
Can someone explain in plain English what exactly this does and why you would like to do it?
Creates a binding of type MyConcreteClass annotated with @Named("foo") using the implementation class MyConcreteClass . You would do this if you wanted to enter this type:
MyConcreteClass
@Named("foo")
@Inject public Bar(@Named("foo") MyConcreteClass object) { ... }
Source: https://habr.com/ru/post/1344182/More articles:Saving many objects using Java - javaE_ACCESSDENIED on CoCreateInstance, where he worked - c ++What is the limit on the number of keys I can reuse for memcache - phpthe benefits of synonyms IN SQL? - rdbmsDelete border in Android Gallery widgets? - androidUse sp_addmessage to write to EventLog with a different event id - sqlCan I use IronPython and IronRuby side by side in one application? - c #Cancel NSOperation: subclass of NSInvocationOperation or NSOperation? - objective-cEmbedding both IronRuby and IronPython - ironpythoncss text background for the space between the text lines - htmlAll Articles