本文整理汇总了Java中com.buschmais.jqassistant.core.plugin.impl.PluginRepositoryImpl类的典型用法代码示例。如果您正苦于以下问题:Java PluginRepositoryImpl类的具体用法?Java PluginRepositoryImpl怎么用?Java PluginRepositoryImpl使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
PluginRepositoryImpl类属于com.buschmais.jqassistant.core.plugin.impl包,在下文中一共展示了PluginRepositoryImpl类的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: repositories
import com.buschmais.jqassistant.core.plugin.impl.PluginRepositoryImpl; //导入依赖的package包/类
@Test
public void repositories() throws PluginRepositoryException {
PluginConfigurationReader pluginConfigurationReader = new PluginConfigurationReaderImpl(PluginRepositoryTest.class.getClassLoader());
PluginRepository pluginRepository = new PluginRepositoryImpl(pluginConfigurationReader);
// Scanner plugins
ScannerContext scannerContext = mock(ScannerContext.class);
Map<String, ScannerPlugin<?, ?>> scannerPlugins = pluginRepository.getScannerPluginRepository().getScannerPlugins(scannerContext, Collections.<String, Object>emptyMap());
assertThat(scannerPlugins.size(), equalTo(2));
assertThat(scannerPlugins.get(TestScannerPlugin.class.getSimpleName()), notNullValue());
assertThat(scannerPlugins.get("testScanner"), notNullValue());
// Report plugins
Map<String, ReportPlugin> reportPlugins = pluginRepository.getReportPluginRepository().getReportPlugins(Collections.<String, Object>emptyMap());
assertThat(reportPlugins.size(), equalTo(2));
assertThat(reportPlugins.get(TestReportPlugin.class.getSimpleName()), notNullValue());
assertThat(reportPlugins.get("testReport"), notNullValue());
}
示例2: PluginRepositoryProvider
import com.buschmais.jqassistant.core.plugin.impl.PluginRepositoryImpl; //导入依赖的package包/类
PluginRepositoryProvider() throws MojoExecutionException {
try {
pluginRepository = new PluginRepositoryImpl(pluginConfigurationReader);
} catch (PluginRepositoryException e) {
throw new MojoExecutionException("Cannot create plugin repository.", e);
}
}
示例3: getPluginRepository
import com.buschmais.jqassistant.core.plugin.impl.PluginRepositoryImpl; //导入依赖的package包/类
/**
* Initialize the plugin repository.
*
* @return The repository.
* @throws CliExecutionException
* If initialization fails.
*/
private PluginRepository getPluginRepository() throws CliExecutionException {
PluginConfigurationReader pluginConfigurationReader = new PluginConfigurationReaderImpl(createPluginClassLoader());
try {
return new PluginRepositoryImpl(pluginConfigurationReader);
} catch (PluginRepositoryException e) {
throw new CliExecutionException("Cannot create plugin repository.", e);
}
}
示例4: pluginProperties
import com.buschmais.jqassistant.core.plugin.impl.PluginRepositoryImpl; //导入依赖的package包/类
/**
* Verifies that properties are loaded and passed to plugins.
*
* @throws PluginRepositoryException If the test fails.
*/
@Test
public void pluginProperties() throws PluginRepositoryException {
PluginConfigurationReader pluginConfigurationReader = new PluginConfigurationReaderImpl(PluginRepositoryTest.class.getClassLoader());
Map<String, Object> properties = new HashMap<>();
properties.put("testKey", "testValue");
PluginRepository pluginRepository = new PluginRepositoryImpl(pluginConfigurationReader);
// scanner plugins
verifyProperties(getScannerPluginProperties(pluginRepository, properties));
// report plugins
verifyProperties(getReportPluginProperties(pluginRepository, properties));
}