src/main/java/org/jboss/loom/migrators/_ext/ExternalMigratorsLoader.java
public static Map<Class<? extends DefinitionBasedMigrator>, DefinitionBasedMigrator> instantiateMigratorsFromDefinitions (
            List<MigratorDefinition> defs, 
            Map<String, Class<? extends IConfigFragment>> fragClasses,
            GlobalConfiguration globConf
        ) throws MigrationException
    {
        //List<Class<? extends DefinitionBasedMigrator>> migClasses = new LinkedList();
        Map<Class<? extends DefinitionBasedMigrator>, DefinitionBasedMigrator> migrators = new HashMap();
        List<Exception> problems  = new LinkedList();
        
        // For each <migrator ...> definition...
        for( MigratorDefinition migDef : defs ) {
            log.debug("Instantiating " + migDef);
            try {
                // JAXB classes.
                Map<String, Class<? extends IConfigFragment>> jaxbClasses = loadJaxbClasses( migDef );
                
                // Migrator class.
                Class<? extends DefinitionBasedMigrator> migClass = MigratorSubclassMaker.createClass( migDef.name );
                //migClasses.add( migClass );

                // Instance.
                //final DefinitionBasedMigrator mig = DefinitionBasedMigrator.from( desc, gc );
                DefinitionBasedMigrator mig = MigratorSubclassMaker.instantiate( migClass, migDef, globConf );
                migrators.put( migClass, mig );
            } catch( Exception ex ) {
                problems.add( ex );
            }
        }
        MigrationExceptions.wrapExceptions( problems, "Failed processing migrator definitions. ");
        return migrators;
    }
/**
     *  Processes the definitions - loads the used classes and creates the migrator objects.
     */
Processes the definitions - loads the used classes and creates the migrator objects.
Processes the definitions - loads the used classes and creates the migrator objects .
public static Map<Class<? extends DefinitionBasedMigrator>, DefinitionBasedMigrator> instantiateMigratorsFromDefinitions (
            List<MigratorDefinition> defs, 
            Map<String, Class<? extends IConfigFragment>> fragClasses,
            GlobalConfiguration globConf
        ) throws MigrationException
    {
        Map<Class<? extends DefinitionBasedMigrator>, DefinitionBasedMigrator> migrators = new HashMap();
        List<Exception> problems  = new LinkedList();
        for( MigratorDefinition migDef : defs ) {
            log.debug("Instantiating " + migDef);
            try {
                Map<String, Class<? extends IConfigFragment>> jaxbClasses = loadJaxbClasses( migDef );
                Class<? extends DefinitionBasedMigrator> migClass = MigratorSubclassMaker.createClass( migDef.name );
                DefinitionBasedMigrator mig = MigratorSubclassMaker.instantiate( migClass, migDef, globConf );
                migrators.put( migClass, mig );
            } catch( Exception ex ) {
                problems.add( ex );
            }
        }
        MigrationExceptions.wrapExceptions( problems, "Failed processing migrator definitions. ");
        return migrators;
    }
public static Map < Class < ? extends DefinitionBasedMigrator > , DefinitionBasedMigrator > instantiateMigratorsFromDefinitions ( List < MigratorDefinition > defs , Map < String , Class < ? extends IConfigFragment > > fragClasses , GlobalConfiguration globConf ) throws MigrationException { Map < Class < ? extends DefinitionBasedMigrator > , DefinitionBasedMigrator > migrators = new HashMap ( ) ; List < Exception > problems = new LinkedList ( ) ; for ( MigratorDefinition migDef : defs ) { log . debug ( "Instantiating " + migDef ) ; try { Map < String , Class < ? extends IConfigFragment > > jaxbClasses = loadJaxbClasses ( migDef ) ; Class < ? extends DefinitionBasedMigrator > migClass = MigratorSubclassMaker . createClass ( migDef . name ) ; DefinitionBasedMigrator mig = MigratorSubclassMaker . instantiate ( migClass , migDef , globConf ) ; migrators . put ( migClass , mig ) ; } catch ( Exception ex ) { problems . add ( ex ) ; } } MigrationExceptions . wrapExceptions ( problems , "Failed processing migrator definitions. " ) ; return migrators ; }
Processes the definitions - loads the used classes and creates the migrator objects.
Processes the definitions - loads the used classes and creates the migrator objects .
//List<Class<? extends DefinitionBasedMigrator>> migClasses = new LinkedList(); // For each <migrator ...> definition... // JAXB classes. // Migrator class. //migClasses.add( migClass ); // Instance. //final DefinitionBasedMigrator mig = DefinitionBasedMigrator.from( desc, gc );