Package net.sourceforge.javautil.groovy.cli.debug

Source Code of net.sourceforge.javautil.groovy.cli.debug.EntryPointCommandLine

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();
   
  }

}
TOP

Related Classes of net.sourceforge.javautil.groovy.cli.debug.EntryPointCommandLine

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.