当前位置: 首页>>代码示例>>Java>>正文


Java ScannerPluginRepository类代码示例

本文整理汇总了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();
    }
}
 
开发者ID:buschmais,项目名称:jqa-maven-plugin,代码行数:22,代码来源:ScanMojo.java

示例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;
}
 
开发者ID:buschmais,项目名称:jqassistant-server,代码行数:33,代码来源:AbstractPluginInitializer.java


注:本文中的com.buschmais.jqassistant.core.plugin.api.ScannerPluginRepository类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。