I'm still a little lost, but I think you should probably either be looking
at AssistedInject or MapBinder.

I agree with Craig McClanahan that @Named is probably not the right
construct. It's just a way to create a distinct qualifier that you can use
at the binding site and at the injection site.

But it sounded as though Adrian Cole understood more of what you were
saying, so I'd go with that.

--tim


On Tue, Jul 24, 2012 at 3:47 PM, MarvinToll.com <[email protected]>wrote:

> Let me try to further clarify the problem statement...
>
> I'm trying to inject a ForkJoinPool:
>
>     @Inject
>     @Named(SjcConstant.FORK_JOIN_POOL_NAME)
>     private SjcPiForkJoinPoolSI forkJoinPoolSI;
>
> And instead of using a hard-coded SjcConstant.FORK_JOIN_POOL_NAME I
> would like to use a property value bound in a Module similar to:
>
>     @Override
>     protected void configure() {
>
>         final Properties properties = new Properties();
>         putPropertiesTM(properties);
>         Names.bindProperties(binder(), properties);
>
>     @Override
>     public void putPropertiesTM(final Properties properties) {
>
>
> properties.put(SjcPiMultiCoreSI.DEPENDENT_FORK_JOIN_POOL_PLUGIN_KEY,
>                 SjcConstant.FORK_JOIN_POOL_PLUGIN_NAME);
>
>         return;
>     }
>
> Is there a non-hack strategy for this?
>
>
> On Jul 24, 3:22 pm, Adrian Cole <[email protected]> wrote:
> > Not necessarily endorsing this, but here goes...
> >
> > 1. convert things bound to something you can inject
> >
> > https://github.com/jclouds/jclouds/blob/master/core/src/main/java/org...
> >
> > 2. convert that into the form desired:
> >
> > https://github.com/jclouds/jclouds/blob/master/core/src/main/java/org...
> >
> > Or.. do something even more hacky :P
> >
> > -A
> >
>
> --
> 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.
>
>

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