thanks! I'd seen that but wasn't sure if it was what I needed. Looks like
will work.
On Tuesday, December 4, 2012 6:25:18 PM UTC-8, Christian Gruber wrote:
>
> On 4 Dec 2012, at 21:19, Alper Akture wrote:
>
> > Is there a way to get a name property directly from an injector? I know
> we
> > shouldn't use injectors directly, but this is a special circumstance. I
> was
> > looking for something like
> >
> > boolean authBypass = injector.getProperty(@Named("bypass_auth"))
> >
> > or similar
> >
>
> How about…
>
> injector.getInstance(Keys.get(Boolean.class, Names.named("bypass_auth")));
>
> Christian.
>
--
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/-/oEUFyaaKaFcJ.
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.