// PatternWrapper may cause a ClassNotFoundException if
// running on < JDK1.4 and gnu.regexp is NOT installed.
// Therefor the Error should occur as _early_ as possible.
PatternWrapper.class.getName();
final MutablePicoContainer _parent = (MutablePicoContainer) container;
final MutablePicoContainer _container = _parent.makeChildContainer();
_container.registerComponentImplementation(DefaultFilterFactoryDelegate.class);
_container.registerComponentImplementation(FilterFactoryImpl.class);
_container.registerComponentInstance(IContainer.class, new IContainer()
{
public MutablePicoContainer getContainer()
{
return _container;
}
public void destroy()
{
_parent.removeChildContainer(_container);
}
});
FilterFactoryImpl servant =
(FilterFactoryImpl) _container.getComponentInstanceOfType(FilterFactoryImpl.class);
return FilterFactoryHelper.narrow(servant.activate());
}