package net.sourceforge.javautil.groovy.cli.debug;
import net.sourceforge.javautil.classloader.boot.EntryPoint;
import net.sourceforge.javautil.classloader.boot.EntryPointConfiguration;
import net.sourceforge.javautil.classloader.boot.EntryPointSettings;
import net.sourceforge.javautil.classloader.boot.EntryPointSettingsAbstract;
import net.sourceforge.javautil.classloader.boot.EntryPointTypeAbstract;
import net.sourceforge.javautil.common.coersion.CoersionContext;
import net.sourceforge.javautil.common.io.console.StandardConsole;
import net.sourceforge.javautil.groovy.cli.GroovyCLI;
import net.sourceforge.javautil.groovy.coerce.GStringCoersion;
import net.sourceforge.javautil.groovy.dsl.GroovyDSLContext;
import net.sourceforge.javautil.groovy.dsl.GroovyMetaClassCreationHandle;
import net.sourceforge.javautil.groovy.dsl.impl.standard.GroovyDSLManagerStandard;
/**
* This provides a groovy script CLI for interboot manipulation.
*
* @author elponderador
* @author $Author$
* @version $Id$
*/
public class EntryPointCommandLine extends EntryPointTypeAbstract {
public EntryPointCommandLine(EntryPoint entryPoint, EntryPointSettings settings) {
super(entryPoint, settings);
}
public void main(EntryPointConfiguration config) throws Throwable {
GroovyMetaClassCreationHandle.bootstrap();
GroovyDSLContext.setGlobalManager( new GroovyDSLManagerStandard().initialize() );
GroovyCLI cli = new GroovyCLI();
cli.getDomain().setVariable("entry", this.entryPoint);
cli.getDomain().setVariable("config", config);
cli.getDomain().setVariable("epcli", this);
cli.getSet().add(new ExecuteMainCommand("execute"));
cli.initialize();
cli.run();
}
}