當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。