I'd like to gain access to an annotation at the injection point within a
provider. The idea is that at startup, clients dynamically register names
of objects. After startup, clients can gain access to these objects using
the @Named annotation. The provider would use the value of @Named to find
the named object.
Example client code:
@Inject
public Constructor(@Named("my-object-name") SomeClass object) {...}
Provider code that I'd like to write:
public ObjectProvider {
public SomeClass get(Annotation a) {
// lookup value of a and return it
}
}
How can I accomplish this? I'm sure I'm missing something obvious in the
docs.
Thanks
--
You received this message because you are subscribed to the Google Groups
"google-guice" group.
To view this discussion on the web visit
https://groups.google.com/d/msg/google-guice/-/UnOga79Gk7wJ.
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?hl=en.