**** Still a Newbie ****
Context: All injectable plugins are sequentially bound at server startup
with properties and unique names:
Names.*bindProperties*(binder(), properties);
// ********************************
// * Four Combinations Start Here *
// ********************************
if (this.pluginElementPO.isPluginCacheable()) {
// Yes interface, yes singleton.
bind(pluginInterface)
.annotatedWith(Names.named(pluginUniqueName))
.to(pluginConcrete).asEagerSingleton();
} else {
// Yes interface, no singleton.
bind(pluginInterface).annotatedWith(
Names.named(pluginUniqueName)).to(pluginConcrete);
}
} else if (this.pluginElementPO.isPluginCacheable()) {
// No interface, yes singleton.
bind(pluginConcrete).annotatedWith(Names.named(pluginUniqueName))
.to(pluginConcrete).asEagerSingleton();
} else {
// No interface, no singleton.
bind(pluginConcrete).annotatedWith(Names.named(pluginUniqueName))
.to(pluginConcrete);
}
Each concrete injectable plugin has a template method similar to the
following for retrieving the Properties:
/**
* @see SjcBasePluginSI#retreivePluginPropertyPO()
*/
@Override
public SjcPluginPropertyPO retreivePluginPropertyPO() {
return [*How do I get a reference to the Properties?*];
}
Excuse me if this is extraordinarily obvious.. I can't seem to forumulate
the question in a way Google can understand.
Marvin
http://PatternEnabled.com
<http://PatternEnabled.com>
<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/-/WOM6YHUholYJ.
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.