package org.implab.gradle.variants.internal;

import org.gradle.api.Named;
import org.gradle.api.NamedDomainObjectContainer;
import org.gradle.api.model.ObjectFactory;

public final class IdentityContainerFactory {
    private IdentityContainerFactory() {
    }

    public static <T extends Named> NamedDomainObjectContainer<T> create(ObjectFactory objectFactory, Class<T> type) {
        return objectFactory.domainObjectContainer(type, name -> objectFactory.named(type, name));
    }
}
