<#assign licenseFirst = "/*">
<#assign licensePrefix = " * ">
<#assign licenseLast = " */">
<#include "../Licenses/license-${project.license}.txt">

package ${PACKAGENAME};

import org.graalvm.visualvm.core.datasource.DataSource;
import org.graalvm.visualvm.core.model.AbstractModelProvider;

public class ${TEMPLATENAME}ModelProvider extends AbstractModelProvider<${TEMPLATENAME}Model, DataSource> {
    private static class Singleton {
        final private static ${TEMPLATENAME}ModelProvider INSTANCE = new ${TEMPLATENAME}ModelProvider();
    }

    private ${TEMPLATENAME}ModelProvider() {}

    @Override
    public ${TEMPLATENAME}Model createModelFor(DataSource datasource) {
        // TODO check the datasource and create an appropriate model, eventually
        return null;
    }
    
    public static ${TEMPLATENAME}ModelProvider getInstance() {
        return Singleton.INSTANCE;
    }

    /**
     * TODO Call this method from the module Installer#restored()
     **/
    public static void install() {
        // TODO register with the appropriate model factory
    }

    /**
     * TODO Call this method from the module Installer#uninstalled()
     **/
    public static void uninstall() {
        // TODO unregister from the appropriate model factory
    }
}

