public synchronized Object getComponentInstance(PicoContainer container) throws PicoInitializationException, PicoIntrospectionException { return super.getComponentInstance(container); } }
public ComponentAdapter registerComponent(ComponentAdapter componentAdapter) { if (componentAdapter instanceof DecoratingComponentAdapter) { componentAdapter = ((DecoratingComponentAdapter) componentAdapter).getDelegate(); } Object key = componentAdapter.getComponentKey(); if (componentAdapter instanceof InstanceComponentAdapter) { Object instance = ((InstanceComponentAdapter) componentAdapter).getComponentInstance(null); put(key, instance); } else { Class implementation = componentAdapter.getComponentImplementation(); put(key, implementation); } return componentAdapter; }
/** * Return the type of the component. If the component type is not compatible with the type to assimilate, the assimilated * type is returned. * * @see org.picocontainer.defaults.DecoratingComponentAdapter#getComponentImplementation() */ public Class getComponentImplementation() { return isCompatible ? super.getComponentImplementation() : type; }
/** * Return the key of the component. If the key of the delegated component is a type, that is not compatible with the type to * assimilate, then the assimilated type replaces the original type. * * @see org.picocontainer.defaults.DecoratingComponentAdapter#getComponentKey() */ public Object getComponentKey() { final Object key = super.getComponentKey(); if (key instanceof Class && (!isCompatible || !type.isAssignableFrom((Class)key))) { return type; } return key; } }
public String toString() { StringBuffer buffer = new StringBuffer(); buffer.append("["); buffer.append(getPrintableClassName()); buffer.append(" delegate="); buffer.append(delegate); buffer.append("]"); return buffer.toString(); }
/** * Create and return a component instance. If the component instance and the type to assimilate is not compatible, a proxy * for the instance is generated, that implements the assimilated type. * * @see org.picocontainer.defaults.DecoratingComponentAdapter#getComponentInstance(org.picocontainer.PicoContainer) */ public Object getComponentInstance(final PicoContainer container) throws PicoInitializationException, PicoIntrospectionException { return isCompatible ? super.getComponentInstance(container) : Delegating.object( type, super.getComponentInstance(container), proxyFactory); }
public ComponentAdapter registerComponent(ComponentAdapter componentAdapter) { if ( componentAdapter instanceof DecoratingComponentAdapter ) { componentAdapter = ((DecoratingComponentAdapter)componentAdapter).getDelegate(); } Object key = componentAdapter.getComponentKey(); if ( componentAdapter instanceof InstanceComponentAdapter ) { Object instance = ((InstanceComponentAdapter)componentAdapter).getComponentInstance(null); put( key, instance ); } else { Class implementation = componentAdapter.getComponentImplementation(); put( key, implementation ); } return componentAdapter; }
public Object getComponentInstance(PicoContainer container) throws PicoInitializationException, PicoIntrospectionException { final MutablePicoContainer _helperContainer = new DefaultPicoContainer(container); for (int i = 0; i < helperCAs_.length; ++i) { _helperContainer.registerComponent(helperCAs_[i]); } return super.getComponentInstance(_helperContainer); }
public Object getComponentInstance(PicoContainer container) throws PicoInitializationException, PicoIntrospectionException, AssignabilityRegistrationException, NotConcreteRegistrationException { Object instance = instanceReference.get(); if (instance == null) { instance = super.getComponentInstance(container); instanceReference.set(instance); } return instance; }
public Object getComponentInstance(PicoContainer container) throws PicoInitializationException, PicoIntrospectionException { Configuration config = (Configuration) container .getComponentInstanceOfType(Configuration.class); String attribute = config.getAttribute(Attributes.THREADPOLICY, Default.DEFAULT_THREADPOLICY); PushTaskExecutorFactory pushTaskExecutorFactory = (PushTaskExecutorFactory) super .getComponentInstance(container); if (attribute.equalsIgnoreCase("ThreadPool")) { pushTaskExecutorFactory = new PooledPushTaskExecutorFactory(pushTaskExecutorFactory); } return pushTaskExecutorFactory; } }
final Object componentInstance = super.getComponentInstance(container); if (setters == null) { setters = getSetters(getComponentImplementation());
public Object getComponentInstance(PicoContainer container) throws PicoInitializationException, PicoIntrospectionException final POA rootPOA = (POA) super.getComponentInstance(container);
final Object component = super.getComponentInstance(container); if (delegateHasLifecylce) { components.add(component);
public Object getComponentInstance(PicoContainer container) throws PicoInitializationException, PicoIntrospectionException { ORB orb = (ORB) container.getComponentInstanceOfType(ORB.class); MutablePicoContainer tempContainer = new DefaultPicoContainer(container); try { TimeService timeService = TimeServiceHelper.narrow(orb.resolve_initial_references("TimeService")); tempContainer.registerComponent(new CORBAObjectComponentAdapter(TimeService.class, timeService)); } catch (Exception e) { // ignored } return super.getComponentInstance(tempContainer); }