本文整理汇总了Java中org.glassfish.hk2.api.DynamicConfiguration.bind方法的典型用法代码示例。如果您正苦于以下问题:Java DynamicConfiguration.bind方法的具体用法?Java DynamicConfiguration.bind怎么用?Java DynamicConfiguration.bind使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.glassfish.hk2.api.DynamicConfiguration
的用法示例。
在下文中一共展示了DynamicConfiguration.bind方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: link
import org.glassfish.hk2.api.DynamicConfiguration; //导入方法依赖的package包/类
/**
* @see #link(ServiceLocator, Injector)
* @see #newChildInjector(Injector, ServiceLocator)
*/
private static ServiceLocator link(ServiceLocator locator,
Injector injector, Iterable<? extends Binder> binders) {
DynamicConfigurationService dcs = locator.getService(DynamicConfigurationService.class);
DynamicConfiguration dc = dcs.createDynamicConfiguration();
GuiceJustInTimeResolver resolver = new GuiceJustInTimeResolver(locator, injector);
dc.bind(BuilderHelper.createConstantDescriptor(resolver));
dc.addActiveDescriptor(GuiceScopeContext.class);
bind(locator, dc, new MessagingBinders.HeaderDelegateProviders());
for (Binder binder : binders) {
bind(locator, dc, binder);
}
dc.commit();
return locator;
}