blob: 4c664b2e60b91a1b5c3c1ac38eadd889976ae0ad [file] [log] [blame]
/*******************************************************************************
* Copyright (c) 2016 Red Hat, Inc.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v2.0
* which accompanies this distribution, and is available at
* https://www.eclipse.org/legal/epl-2.0/
*
* Contributors:
* Red Hat Inc. - initial API and implementation and/or initial documentation
*******************************************************************************/
package org.eclipse.wst.jsdt.nashorn.extension.loader;
import org.eclipse.osgi.internal.hookregistry.HookConfigurator;
import org.eclipse.osgi.internal.hookregistry.HookRegistry;
/**
* Registers {@link NashornLoaderHook}
*
*/
public class NashornClassLoaderConfigurator implements HookConfigurator {
static final boolean DEBUG = Boolean.getBoolean("jsdt.nashorn.extension.debug");
@Override
public void addHooks(HookRegistry hookRegistry) {
if(DEBUG){
System.out.println("NashornClassLoaderConfigurator is loading NashornLoaderHook");
}
hookRegistry.addClassLoaderHook(new NashornLoaderHook());
}
}