本文整理汇总了Java中com.buschmais.jqassistant.core.plugin.api.ScannerPluginRepository类的典型用法代码示例。如果您正苦于以下问题:Java ScannerPluginRepository类的具体用法?Java ScannerPluginRepository怎么用?Java ScannerPluginRepository使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
ScannerPluginRepository类属于com.buschmais.jqassistant.core.plugin.api包,在下文中一共展示了ScannerPluginRepository类的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: execute
import com.buschmais.jqassistant.core.plugin.api.ScannerPluginRepository; //导入依赖的package包/类
@Override
public void execute(MavenProject mavenProject, Store store) throws MojoExecutionException, MojoFailureException {
ScannerConfiguration configuration = new ScannerConfiguration();
configuration.setContinueOnError(continueOnError);
ScannerContext scannerContext = new ScannerContextImpl(store);
ScannerPluginRepository scannerPluginRepository = pluginRepositoryProvider.getScannerPluginRepository();
Map<String, ScannerPlugin<?, ?>> scannerPlugins;
try {
scannerPlugins = scannerPluginRepository.getScannerPlugins(scannerContext, getPluginProperties());
} catch (PluginRepositoryException e) {
throw new MojoExecutionException("Cannot determine scanner plugins.", e);
}
ScopePluginRepository scopePluginRepository = pluginRepositoryProvider.getScopePluginRepository();
Scanner scanner = new ScannerImpl(configuration, scannerContext, scannerPlugins, scopePluginRepository.getScopes());
store.beginTransaction();
try {
scanner.scan(mavenProject, mavenProject.getFile().getAbsolutePath(), MavenScope.PROJECT);
} finally {
store.commitTransaction();
}
}
示例2: start
import com.buschmais.jqassistant.core.plugin.api.ScannerPluginRepository; //导入依赖的package包/类
@Override
public final Collection<Injectable<?>> start(GraphDatabaseService graphDatabaseService, Configuration config) {
Set<Injectable<?>> injectables = new HashSet<>();
PluginConfigurationReader pluginConfigurationReader = new PluginConfigurationReaderImpl(AbstractPluginInitializer.class.getClassLoader());
try {
ScopePluginRepository scopePluginRepository = new ScopePluginRepositoryImpl(pluginConfigurationReader);
injectables.add(new SimpleInjectable<>(scopePluginRepository, ScopePluginRepository.class));
ScannerPluginRepository scannerPluginRepository = new ScannerPluginRepositoryImpl(pluginConfigurationReader);
injectables.add(new SimpleInjectable<>(scannerPluginRepository, ScannerPluginRepository.class));
ModelPluginRepository modelPluginRepository = new ModelPluginRepositoryImpl(pluginConfigurationReader);
injectables.add(new SimpleInjectable<>(modelPluginRepository, ModelPluginRepository.class));
store = new GraphDbStore(graphDatabaseService);
store.start(modelPluginRepository.getDescriptorTypes());
injectables.add(new SimpleInjectable<>(store, Store.class));
ScannerContext context = new ScannerContextImpl(store);
List<ScannerPlugin<?, ?>> scannerPlugins = scannerPluginRepository.getScannerPlugins(context, Collections.<String, Object> emptyMap());
Scanner scanner = new ScannerImpl(context, scannerPlugins, scopePluginRepository.getScopes());
injectables.add(new SimpleInjectable<>(scanner, Scanner.class));
} catch (PluginRepositoryException e) {
throw new RuntimeException("Setting up plugin repositories failed.", e);
}
injectables.addAll(getInjectables(store, config));
return injectables;
}