/** * {@inheritDoc} * * @param componentKey * @return * @see org.picocontainer.PicoContainer#getComponentAdapter(java.lang.Object) */ public ComponentAdapter<?> getComponentAdapter(final Object componentKey) { if (logger.isDebugEnabled()) { logger.debug("Locating component adapter with key " + componentKey); } ComponentAdapter adapter = delegate.getComponentAdapter(componentKey); if (adapter == null) { onKeyOrTypeDoesNotExistInContainer(componentKey, logger); } return adapter; }
@SuppressWarnings({"rawtypes", "unchecked"}) public Publisher publish(Object key) { if (key == null) { throw new NullPointerException("key"); } final ComponentAdapter ca = child.getComponentAdapter(key); if (ca == null) { throw new IllegalArgumentException(key + " does not appear to exist in container " + child); } parent.addAdapter(new Publishing<Object>(child, ca)); return this; }
public <T> ComponentAdapter<T> getComponentAdapter( final Class<T> componentType, final Class<? extends Annotation> binding) { if (logger.isDebugEnabled()) { logger.debug( "Grabbing component adapter for container: " + delegate + " of type: " + componentType.getName() + ", binding:" + binding.getName()); } return delegate.getComponentAdapter(componentType, binding); }
/** * {@inheritDoc} * * @param componentType * @return ComponentAdapter or null. * @see org.picocontainer.PicoContainer#getComponentAdapter(java.lang.Class) */ public <T> ComponentAdapter<T> getComponentAdapter( final Class<T> componentType, final NameBinding componentNameBinding) { if (logger.isDebugEnabled()) { logger.debug("Locating component adapter with type " + componentType); } ComponentAdapter<T> ca = delegate.getComponentAdapter(componentType, componentNameBinding); if (ca == null) { onKeyOrTypeDoesNotExistInContainer(ca, logger); } return ca; }