A task is required to be handled programmtically... here is the 
representative 'bind':
 
        bind(SjcPiTimerSI.class).annotatedWith(
                Names.named(SjcConstant.TIMER_PLUGIN)).to(SjcPiTimer.class);
 
However, an instance containing properties is also required.... here is the 
representative '@Provides':
 
    @Provides
    @Named(SjcConstant.TIMER_PLUGIN)
    SjcPiTimerSI provideTimer() {
 
        final SjcPiTimer timer = new SjcPiTimer();
        final SjcPluginPropertyPO pluginPropertyPO = new 
SjcPluginPropertyPO(
                SjcConstant.TIMER_PLUGIN, getTimerProperties());
        timer.setPluginPropertiesOrNullTM(pluginPropertyPO);

        return timer;
    }

 

*Question:*

Is there a way accomplish the addition of the Plugin Property PO with a 
semantic similar to the 'bind' above?  Said another way, I'd like to be 
able to 'bind' (including properties) without having to use an annotation.

_Marvin
http://PatternEnabled.com 

-- 
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/-/a72BRRJ-ongJ.
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