typeDefintion = (QName) context.getComponentInstance( "http://geotools.org/typeDefinition");
public Object get(Object o) { if (o instanceof Class) { return mutablePicoContainer.getComponentInstanceOfType((Class)o); } else { return mutablePicoContainer.getComponentInstance(o); } }
typeDefinition = (QName) context.getComponentInstance( "http://geotools.org/typeDefinition"); if (typeDefinition != null) {
public boolean containsKey(Object o) { if (o instanceof Class) { return mutablePicoContainer.getComponentInstanceOfType((Class)o) != null; } else { return mutablePicoContainer.getComponentInstance(o) != null; } }
protected ORB getORB() { return (ORB) container_.getComponentInstance(ORB.class); }
QName typeDefinition = (QName) context.getComponentInstance( "http://geotools.org/typeDefinition");
public Object getComponentInstance(Object componentKey) { return delegate.getComponentInstance(componentKey); }
public AbstractFilter create_filter_servant(String grammar) throws InvalidGrammar { AbstractFilter _filterServant = (AbstractFilter) filterPico_.getComponentInstance(grammar); if (_filterServant == null) { logger_.error("unable to create FilterServant as grammar " + grammar + " is unknown"); throw new InvalidGrammar("Constraint Language '" + grammar + "' is not supported. Supported are: " + getAvailableConstraintLanguages()); } return _filterServant; }
protected AbstractEventChannel newEventChannel() { final MutablePicoContainer _container = newContainerForChannel(); _container.registerComponentImplementation(AbstractEventChannel.class, TypedEventChannelImpl.class); return (AbstractEventChannel) _container.getComponentInstance(AbstractEventChannel.class); }
public Set entrySet() { Set set = new HashSet(); Collection adapters = mutablePicoContainer.getComponentAdapters(); for (final Iterator iter = adapters.iterator(); iter.hasNext();) { final Object key = ((ComponentAdapter)iter.next()).getComponentKey(); final Object component = mutablePicoContainer.getComponentInstance(key); set.add(new Map.Entry() { public Object getKey() { return key; } public Object getValue() { return component; } public Object setValue(Object value) { throw new UnsupportedOperationException("Cannot set component"); } }); } return Collections.unmodifiableSet(set); } }
/** * Instantiates an action using the PicoContainer found in the request scope. */ public Object buildBean(Class actionClass) throws Exception { MutablePicoContainer actionsContainer = actionsContainerFactory.getActionsContainer((HttpServletRequest) objectReference.get()); Object action = actionsContainer.getComponentInstance(actionClass); if (action == null) { // The action wasn't registered. Attempt to instantiate it. MutablePicoContainer container = new DefaultPicoContainer(actionsContainer); container.registerComponentImplementation(actionClass); action = container.getComponentInstance(actionClass); } return action; }
private RetryStrategyFactory newRetryStrategyFactory(Configuration config, TaskProcessor taskProcessor, String factoryName) throws ClassNotFoundException { final Class factoryClazz = ObjectUtil.classForName(factoryName); final MutablePicoContainer pico = new DefaultPicoContainer(); pico.registerComponentInstance(TaskProcessor.class, taskProcessor); pico.registerComponentImplementation(RetryStrategyFactory.class, factoryClazz); pico.registerComponentInstance(config); return (RetryStrategyFactory) pico.getComponentInstance(RetryStrategyFactory.class); }
QName typeDefintion = (QName) context.getComponentInstance( "http://geotools.org/typeDefinition");
protected Object buildInstance(String actionClassName) { NanoContainer factory = new DefaultNanoContainer(); factory.getPico().registerComponentInstance(PicoContext.class, context); factory.getPico().registerComponentInstance(PicoContainer.class, parentContainer); try { factory.registerComponentImplementation("action", actionClassName); return (NodeBuilder) factory.getPico().getComponentInstance("action"); } catch (ClassNotFoundException e) { throw new org.nanocontainer.script.BuilderClassNotFoundException(actionClassName + " class name not found", e); } }