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

package ${PACKAGENAME};

import org.graalvm.visualvm.application.Application;
import org.graalvm.visualvm.core.model.AbstractModelProvider;
import org.graalvm.visualvm.application.type.ApplicationType;
import org.graalvm.visualvm.application.type.ApplicationTypeFactory;

public class ${TEMPLATENAME}ApplicationTypeProvider extends AbstractModelProvider<ApplicationType,Application> {
    private static class Singleton {
        final private static ${TEMPLATENAME}ApplicationTypeProvider INSTANCE = new ${TEMPLATENAME}ApplicationTypeProvider();
    }

    private ${TEMPLATENAME}ApplicationTypeProvider() {}

    /**
     * TODO Call this method from the module Installer#restored()
     **/
    static public void install() {
        ApplicationTypeFactory.getDefault().registerProvider(Singleton.INSTANCE);
    }
    
    /**
     * TODO Call this method from the module Installer#uninstalled()
     **/
    static public void uninstall() {
        ApplicationTypeFactory.getDefault().unregisterProvider(Singleton.INSTANCE);
    }

    @Override
    public ApplicationType createModelFor(Application appl) {
        /* put your logic here */
        return null;
    }    
}
