private ElementRegistry create() {
        ElementRegistry registry;

        // Fudge a task scope context as many of the beans require one before
        // they can be created.
        LOGGER.info("Initialising pipeline element registry.");
        final List<Class<?>> elementClasses = new ArrayList<>();
        for (final ElementType elementType : elementMap.keySet()) {
            final Class<?> clazz = elementType.getElementClass();
            elementClasses.add(clazz);

            if (LOGGER.isDebugEnabled()) {
                final ConfigurableElement pipelineElement = clazz.getAnnotation(ConfigurableElement.class);
                if (pipelineElement != null) {
                    LOGGER.debug("Registering pipeline element " + pipelineElement.type());
                }
            }
        }

        registry = new ElementRegistry(elementClasses);
        LOGGER.info("Finished initialising pipeline element registry.");

        return registry;
    }
Implements an idiom to prevent double checked locking.
stroom-pipeline/src/main/java/stroom/pipeline/factory/ElementRegistryFactoryImpl.java