/** * {@inheritDoc} The returned ComponentAdapter will be instantiated by the * {@link ComponentAdapterFactory} passed to the container's constructor. */ public ComponentAdapter registerComponentImplementation(Object componentKey, Class componentImplementation, Parameter[] parameters) throws PicoRegistrationException { ComponentAdapter componentAdapter = componentAdapterFactory.createComponentAdapter(componentKey, componentImplementation, parameters); registerComponent(componentAdapter); return componentAdapter; }
public ComponentAdapter createComponentAdapter(Object componentKey, Class componentImplementation, Parameter[] parameters) throws PicoIntrospectionException, AssignabilityRegistrationException, NotConcreteRegistrationException { return delegate.createComponentAdapter(componentKey, componentImplementation, parameters); } }
/** * {@inheritDoc} * The returned ComponentAdapter will be instantiated by the {@link ComponentAdapterFactory} * passed to the container's constructor. */ public ComponentAdapter registerComponentImplementation(Object componentKey, Class componentImplementation, Parameter[] parameters) { ComponentAdapter componentAdapter = componentAdapterFactory.createComponentAdapter(componentKey, componentImplementation, parameters); return registerComponent(componentAdapter); }
private void loadFilterPlugins(Configuration conf) { org.jacorb.config.Configuration config = (org.jacorb.config.Configuration)conf; ComponentAdapter etclCA = componentAdapterFactory_.createComponentAdapter(ETCLFilter.CONSTRAINT_GRAMMAR, ETCLFilter.class, null); // add default ETCL Filter filterPico_.registerComponent(etclCA); availableFilters_.add(ETCLFilter.CONSTRAINT_GRAMMAR); Iterator i = config.getAttributeNamesWithPrefix(Attributes.FILTER_PLUGIN_PREFIX).iterator(); while (i.hasNext()) { String key = (String) i.next(); String _clazzName = null; try { String _grammar = key.substring(Attributes.FILTER_PLUGIN_PREFIX.length() + 1); logger_.info("Loading Filterplugin for Grammar: " + _grammar); _clazzName = conf.getAttribute(key); Class _clazz = ObjectUtil.classForName(_clazzName); ComponentAdapter customCA = componentAdapterFactory_.createComponentAdapter(_grammar, _clazz, null); filterPico_.registerComponent(customCA); availableFilters_.add(_grammar); } catch (ConfigurationException e) { logger_.error("Unable to access attribute: " + key, e); } catch (ClassNotFoundException e) { logger_.error("Property " + key + ": Unable to load FilterPlugin " + _clazzName + ". The FilterPlugin will not be available.", e); } } }