本文整理汇总了Java中com.google.inject.Provider.get方法的典型用法代码示例。如果您正苦于以下问题:Java Provider.get方法的具体用法?Java Provider.get怎么用?Java Provider.get使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类com.google.inject.Provider
的用法示例。
在下文中一共展示了Provider.get方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: getApplicationConfiguration
import com.google.inject.Provider; //导入方法依赖的package包/类
@CheckedProvides(IOProvider.class)
public ApplicationConfiguration getApplicationConfiguration(ApplicationConfigurationParser applicationConfigurationParser,
@Named(CONFIGURATION_FILE)
Provider<File> fileProvider) throws IOException {
File file = fileProvider.get();
return applicationConfigurationParser.parseApplicationConfiguration(file);
}
示例2: getRequestFilter
import com.google.inject.Provider; //导入方法依赖的package包/类
@CheckedProvides(IOProvider.class)
public RequestFilter getRequestFilter(@Named(COMMAND) String command,
IOProvider<List<EventDetector>> eventDetectorListProvider,
Provider<RecordingState> recordingStateProvider,
Provider<ReplayingState> replayingStateProvider,
Provider<List<ConditionsUpdater>> conditionsUpdaters) throws IOException {
switch (command) {
case RECORD:
return new RecordRequestFilter(recordingStateProvider.get(), eventDetectorListProvider.get());
case REPLAY:
return new ReplayRequestFilter(replayingStateProvider.get(), conditionsUpdaters.get());
default:
throw new NoSuchCommandException();
}
}
示例3: FutureTaskProvider
import com.google.inject.Provider; //导入方法依赖的package包/类
FutureTaskProvider(final Provider<T> creator)
{
super(new Callable<T>()
{
public T call()
{
return creator.get();
}
});
}
示例4: InlineChoiceMathGapModulePresenter
import com.google.inject.Provider; //导入方法依赖的package包/类
@Inject
public InlineChoiceMathGapModulePresenter(SwypeBlocker swypeBlocker, Provider<ExListBox> exListBoxProvider) {
listBox = exListBoxProvider.get();
uiBinder.createAndBindUi(this);
swypeBlocker.addBlockOnOpenCloseHandler(listBox);
}