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


Java BeanScanning类代码示例

本文整理汇总了Java中org.eclipse.sisu.space.BeanScanning的典型用法代码示例。如果您正苦于以下问题:Java BeanScanning类的具体用法?Java BeanScanning怎么用?Java BeanScanning使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


BeanScanning类属于org.eclipse.sisu.space包,在下文中一共展示了BeanScanning类的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: doSetUp

import org.eclipse.sisu.space.BeanScanning; //导入依赖的package包/类
@Before
public final void doSetUp() throws Exception {
  List<Module> modules = new ArrayList<>();

  customizeModules(modules);
  modules.add(new SpaceModule(new URLClassSpace(getClass().getClassLoader()), BeanScanning.INDEX));
  Guice.createInjector(new WireModule(modules));

  setUp();
}
 
开发者ID:sonatype,项目名称:nexus-public,代码行数:11,代码来源:AbstractSecurityTest.java

示例2: injectorFor

import org.eclipse.sisu.space.BeanScanning; //导入依赖的package包/类
@Override
public Injector injectorFor(final ClassLoader classLoader, final Iterable<Module> modules)
{
  return Guice.createInjector(
      Stage.DEVELOPMENT,
      new WireModule(
          new AbstractModule() // params
          {
            @Override
            protected void configure() {
              bind(Vertx.class).toInstance(vertx);
              bind(EventBus.class).toInstance(vertx.eventBus());
              if (parameters != null) {
                bind(ParameterKeys.PROPERTIES).toInstance(parameters);
              }
              if (bootstrapModules != null) {
                for (Module bootstrapModule : bootstrapModules) {
                  install(bootstrapModule);
                }
              }
              for (Module module : modules) {
                install(module);
              }
            }
          },
          new SpaceModule( // space module
              new URLClassSpace(classLoader), BeanScanning.INDEX
          )
      )
  );
}
 
开发者ID:cstamas,项目名称:vertx-sisu,代码行数:32,代码来源:SimpleInjectorFactory.java

示例3: scanning

import org.eclipse.sisu.space.BeanScanning; //导入依赖的package包/类
@Override
public BeanScanning scanning() {
  return BeanScanning.INDEX;
}
 
开发者ID:sonatype,项目名称:nexus-public,代码行数:5,代码来源:SelectorComponentTest.java

示例4: spaceModule

import org.eclipse.sisu.space.BeanScanning; //导入依赖的package包/类
@Override
protected Module spaceModule() {
  return new SpaceModule(space, BeanScanning.GLOBAL_INDEX);
}
 
开发者ID:sonatype,项目名称:nexus-public,代码行数:5,代码来源:NexusBundleModule.java

示例5: init

import org.eclipse.sisu.space.BeanScanning; //导入依赖的package包/类
public void init(@Nullable final Integer poolSize, @Nullable final JobFactory factory) throws Exception {
  eventManager = new SimpleEventManager();
  applicationDirectories = mock(ApplicationDirectories.class);
  baseUrlManager = mock(BaseUrlManager.class);
  nodeAccess = mock(NodeAccess.class);

  Module module = binder -> {
    Properties properties = new Properties();
    properties.put("basedir", util.getBaseDir());
    if (poolSize != null) {
      properties.put("nexus.quartz.poolSize", poolSize);
    }
    binder.bind(ParameterKeys.PROPERTIES)
        .toInstance(properties);

    binder.bind(EventManager.class).toInstance(eventManager);

    File workDir = util.createTempDir(util.getTargetDir(), "workdir");
    when(applicationDirectories.getWorkDirectory(anyString())).thenReturn(workDir);
    binder.bind(ApplicationDirectories.class)
        .toInstance(applicationDirectories);

    binder.bind(BaseUrlManager.class)
        .toInstance(baseUrlManager);

    binder.bind(DatabaseInstance.class)
        .annotatedWith(Names.named("config"))
        .toInstance(databaseInstance);

    when(nodeAccess.getId()).thenReturn("test-12345");
    when(nodeAccess.getMemberIds()).thenReturn(ImmutableSet.of("test-12345"));
    binder.bind(NodeAccess.class)
        .toInstance(nodeAccess);
    if (factory != null) {
      binder.bind(JobFactory.class).toInstance(factory);
    }
  };

  this.injector = Guice.createInjector(new WireModule(
      module, new StateGuardModule(),
      new SpaceModule(new URLClassSpace(TaskSchedulerHelper.class.getClassLoader()), BeanScanning.INDEX)
  ));
  injector.injectMembers(this);
}
 
开发者ID:sonatype,项目名称:nexus-public,代码行数:45,代码来源:TaskSchedulerHelper.java


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