src/main/java/org/fuin/srcgen4j/core/emf/EMFGeneratorConfig.java
@SuppressWarnings("unchecked")
    @NotNull
    public final <MODEL> List<ArtifactFactory<MODEL>> getFactories(final Class<MODEL> modelType) {
        final List<ArtifactFactory<MODEL>> list = new ArrayList<ArtifactFactory<MODEL>>();
        if (factories == null) {
            factories = new ArrayList<ArtifactFactory<?>>();
            if (factoryConfigs != null) {
                for (final ArtifactFactoryConfig factoryConfig : factoryConfigs) {
                    factories.add(factoryConfig.getFactory());
                }
            }
        }
        for (final ArtifactFactory<?> factory : factories) {
            if (modelType.isAssignableFrom(factory.getModelType())) {
                list.add((ArtifactFactory<MODEL>) factory);
            }
        }
        return list;
    }
@SuppressWarnings("unchecked")
    @NotNull
    public final <MODEL> List<ArtifactFactory<MODEL>> getFactories(final Class<MODEL> modelType) {
        final List<ArtifactFactory<MODEL>> list = new ArrayList<ArtifactFactory<MODEL>>();
        if (factories == null) {
            factories = new ArrayList<ArtifactFactory<?>>();
            if (factoryConfigs != null) {
                for (final ArtifactFactoryConfig factoryConfig : factoryConfigs) {
                    factories.add(factoryConfig.getFactory());
                }
            }
        }
        for (final ArtifactFactory<?> factory : factories) {
            if (modelType.isAssignableFrom(factory.getModelType())) {
                list.add((ArtifactFactory<MODEL>) factory);
            }
        }
        return list;
    }
@ SuppressWarnings ( "unchecked" ) @ NotNull public final < MODEL > List < ArtifactFactory < MODEL > > getFactories ( final Class < MODEL > modelType ) { final List < ArtifactFactory < MODEL > > list = new ArrayList < ArtifactFactory < MODEL > > ( ) ; if ( factories == null ) { factories = new ArrayList < ArtifactFactory < ? > > ( ) ; if ( factoryConfigs != null ) { for ( final ArtifactFactoryConfig factoryConfig : factoryConfigs ) { factories . add ( factoryConfig . getFactory ( ) ) ; } } } for ( final ArtifactFactory < ? > factory : factories ) { if ( modelType . isAssignableFrom ( factory . getModelType ( ) ) ) { list . add ( ( ArtifactFactory < MODEL > ) factory ) ; } } return list ; }
Returns a list of factories for the given model type.

@param modelType
Model type to return artifact factories for.

@return List of factories that accept the given model type.

@param <MODEL>
Type of the model to create an artifact for.
Returns a list of factories for the given model type .