class WatchResourcesPlugin {
    private static AgentLogger LOGGER = AgentLogger.getLogger(WatchResourcesPlugin.class);

    @Init
    Watcher watcher;

    @Init
    ClassLoader appClassLoader;


    // Classloader to return only modified resources on watchResources path.
    WatchResourcesClassLoader watchResourcesClassLoader = new WatchResourcesClassLoader(false);

    /**
     * For each classloader check for watchResources configuration instance with hotswapper.
     */
    @Init
    public static void init(PluginManager pluginManager, PluginConfiguration pluginConfiguration, ClassLoader appClassLoader) {<FILL_FUNCTION_BODY>}

    /**
     * Init the plugin instance for resources.
     *
     * @param watchResources resources to watch
     */
    private void init(URL[] watchResources) {
        // configure the classloader to return only changed resources on watchResources path
        watchResourcesClassLoader.initWatchResources(watchResources, watcher);

        if (appClassLoader instanceof HotswapAgentClassLoaderExt) {
            ((HotswapAgentClassLoaderExt) appClassLoader).$$ha$setWatchResourceLoader(watchResourcesClassLoader);
        } else if (URLClassPathHelper.isApplicable(appClassLoader)) {
            // modify the application classloader to look for resources first in watchResourcesClassLoader
            URLClassPathHelper.setWatchResourceLoader(appClassLoader, watchResourcesClassLoader);
        }
    }
}

        LOGGER.debug("Init plugin at classLoader {}", appClassLoader);

        // synthetic classloader, skip
        if (appClassLoader instanceof WatchResourcesClassLoader.UrlOnlyClassLoader)
            return;

        // init only if the classloader contains directly the property file (not in parent classloader)
        if (!pluginConfiguration.containsPropertyFile()) {
            LOGGER.debug("ClassLoader {} does not contain hotswap-agent.properties file, WatchResources skipped.", appClassLoader);
            return;
        }

        // and watch resources are set
        URL[] watchResources = pluginConfiguration.getWatchResources();
        if (watchResources.length == 0) {
            LOGGER.debug("ClassLoader {} has hotswap-agent.properties watchResources empty.", appClassLoader);
            return;
        }

        if (!URLClassPathHelper.isApplicable(appClassLoader) &&
                !(appClassLoader instanceof HotswapAgentClassLoaderExt)) {
            LOGGER.warning("Unable to modify application classloader. Classloader '{}' is of type '{}'," +
                            "unknown classloader type.\n" +
                            "*** watchResources configuration property will not be handled on JVM level ***",
                    appClassLoader, appClassLoader.getClass());
            return;
        }

        // create new plugin instance
        WatchResourcesPlugin plugin = (WatchResourcesPlugin) pluginManager.getPluginRegistry()
                .initializePlugin(WatchResourcesPlugin.class.getName(), appClassLoader);

        // and init it with watchResources path
        plugin.init(watchResources);
    
<no_super_class>