@Test public void shouldNotProvidePrimitiveValues() { assertFalse(container.canProvide(Long.class)); assertFalse(container.canProvide(long.class)); assertFalse(container.canProvide(long[].class)); assertFalse(container.canProvide(Long[].class)); }
public <T> boolean canProvide(Class<T> type) { return BeanFactoryUtils.beanNamesForTypeIncludingAncestors(parentContext, type).length > 0; }
SpringBasedContainer extends AbstractComponentRegistry implements Container { public <T> boolean canProvide(Class<T> type) { return BeanFactoryUtils.beanNamesForTypeIncludingAncestors(parentContext, type).length > 0; } }
SpringBasedContainer extends AbstractComponentRegistry implements Container { public <T> boolean canProvide(Class<T> type) { return BeanFactoryUtils.beanNamesForTypeIncludingAncestors(parentContext, type).length > 0; } SpringBasedContainer(ConfigurableWebApplicationContext parentContext); }
SpringBasedContainer extends AbstractComponentRegistry implements Container { public <T> boolean canProvide(Class<T> type) { return BeanFactoryUtils.beanNamesForTypeIncludingAncestors(parentContext, type).length > 0; } SpringBasedContainer(ConfigurableWebApplicationContext parentContext); void register(Class<?> requiredType, Class<?> componentType); T instanceFor(Class<T> type); boolean canProvide(Class<T> type); void start(ServletContext context); void stop(); }
SpringBasedContainer extends AbstractComponentRegistry implements Container { public <T> boolean canProvide(Class<T> type) { return BeanFactoryUtils.beanNamesForTypeIncludingAncestors(parentContext, type).length > 0; } SpringBasedContainer(ConfigurableWebApplicationContext parentContext); void register(Class<?> requiredType, Class<?> componentType); T instanceFor(Class<T> type); boolean canProvide(Class<T> type); void start(ServletContext context); void stop();  }