@Test public void test_getSingletons() throws Exception { JaxRsApplication app = new JaxRsApplication(ImmutableSet.of(localComponent), ImmutableSet.of(globalComponent), ImmutableSet.of(localClassesProvider), ImmutableSet.of(globalClassesProvider)); Set<Object> singletons = app.getSingletons(); assertEquals(2, singletons.size()); assertTrue(singletons.contains(localComponent)); assertTrue(singletons.contains(globalComponent)); }
@Override public Set<Object> getSingletons() { return Sets.union(globalComponents, localComponents); }
JaxRsApplication extends Application { @Override public Set<Object> getSingletons() { return Sets.union(globalComponents, localComponents); } }
JaxRsApplication extends Application { @Override public Set<Object> getSingletons() { return Sets.union(globalComponents, localComponents); } JaxRsApplication(Set<JaxRsComponent> localComponents, Set<JaxRsComponent> globalComponents,
      Set<JaxRsClassesProvider> localClassesProviders, Set<JaxRsClassesProvider> globalClassesProviders); }
JaxRsApplication extends Application { @Override public Set<Object> getSingletons() { return Sets.union(globalComponents, localComponents); } JaxRsApplication(Set<JaxRsComponent> localComponents, Set<JaxRsComponent> globalComponents,
      Set<JaxRsClassesProvider> localClassesProviders, Set<JaxRsClassesProvider> globalClassesProviders); @Override Set<Object> getSingletons(); @Override Set<Class<?>> getClasses(); @Override Map<String, Object> getProperties(); }
JaxRsApplication extends Application { @Override public Set<Object> getSingletons() { return Sets.union(globalComponents, localComponents); } JaxRsApplication(Set<JaxRsComponent> localComponents, Set<JaxRsComponent> globalComponents,
      Set<JaxRsClassesProvider> localClassesProviders, Set<JaxRsClassesProvider> globalClassesProviders); @Override Set<Object> getSingletons(); @Override Set<Class<?>> getClasses(); @Override Map<String, Object> getProperties();  }