Revision: 1202
Author: sberlin
Date: Tue Aug 10 15:59:13 2010
Log: Edited wiki page through web user interface.
http://code.google.com/p/google-guice/source/detail?r=1202
Modified:
/wiki/UntargettedBindings.wiki
=======================================
--- /wiki/UntargettedBindings.wiki Sat Nov 7 17:20:18 2009
+++ /wiki/UntargettedBindings.wiki Tue Aug 10 15:59:13 2010
@@ -6,3 +6,9 @@
bind(MyConcreteClass.class);
bind(AnotherConcreteClass.class).in(Singleton.class);
}}}
+
+When specifying binding annotations, you must still add the target
binding, even it is the same concrete class. For example:
+{{{
+
bind(MyConcreteClass.class).annotatedWith(Names.named("foo")).to(MyConcreteClass.class);
+
bind(AnotherConcreteClass.class).annotatedWith(Names.named("foo")).to(MyConcreteClass.class).in(Singleton.class);
+}}}
--
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.