class ExtensionInitializer {

    public Collection<Injectable<?>> initializePackages( Iterable<String> packageNames )
    {
        GraphDatabaseAPI graphDatabaseService = neoServer.getDatabase().getGraph();
        Config configuration = neoServer.getConfig();

        Collection<Injectable<?>> injectables = new HashSet<>();
        for ( PluginLifecycle lifecycle : lifecycles )
        {
            if ( hasPackage( lifecycle, packageNames ) )
            {
                if ( lifecycle instanceof SPIPluginLifecycle )
                {
                    SPIPluginLifecycle lifeCycleSpi = (SPIPluginLifecycle) lifecycle;
                    injectables.addAll( lifeCycleSpi.start( neoServer ) );
                }
                else
                {
                    injectables.addAll( lifecycle.start( graphDatabaseService, new ConfigAdapter( configuration ) ) );
                }
            }
        }
        return injectables;
    }

    public  ExtensionInitializer( NeoServer neoServer );

}