Hi,
I am trying to implement my custom scope so that classes annotated
with my scope:
@MyScoped
can be injected with instances of interface AppRequest into their
constructors.
I have followed all the directions in the User Guide for Custom
Scopes, including copying verbatim the annotation code, the
SimpleScope implementation, and the module code.
Next I triggered the scope and seeded an instance of AppRequest into
the scope object:
scope.seed(Key.get(AppRequest.class), instanceObj);
However, I get an error that AppRequest is not bound when I do the
following:
@MyScoped
class MyClass
{
@Inject
MyClass( AppRequest request )
{ }
}
Obviously I'm missing something, which I think is telling the module
how to inject instances of AppRequest from the scope object. The
users guide does not explain this in the Custom Scope section. Can
someone point me in the right direction?
Thanks,
Jeff
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"google-guice" 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?hl=en
-~----------~----~----~----~------~----~------~--~---