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 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.

Reply via email to