metaonly interface xdc.tools.ICmd

Generic xdc-script (xs) command

Modules that implement this interface can serve as "commands" that can be executed from the command line (via xs) or from within XDCscript scripts (without having to fork a separate process to run xs). [ more ... ]
XDCspec summary sourced in xdc/tools/ICmd.xdc
metaonly interface ICmd {  ...
instance:  ...
XDCspec declarations sourced in xdc/tools/ICmd.xdc
package xdc.tools;
 
metaonly interface ICmd {
module-wide config parameters
    config String usage// Usage for this command[] = [ ];
module-wide functions
 
 
instance:
per-instance functions
    Any run// Underlying implementation(Cmdr.Instance cmdr, String args[]);
}
DETAILS
Modules that implement this interface can serve as "commands" that can be executed from the command line (via xs) or from within XDCscript scripts (without having to fork a separate process to run xs).
COMMAND LINE EXAMPLE
The following example runs the xdc.tools.path tool from the command line to get an array of names of all packages below the current working directory (".").
      xs xdc.tools.path -n -a -PR .
XDCSCRIPT EXAMPLE
The following example runs the xdc.tools.path tool from within a script to get an array of names of all packages below the current working directory (".").
      var Main = xdc.module('xdc.tools.path.Main');
      var result = Main.exec(["-n", "-a", "-PR", "."]);
 
config ICmd.usage  // module-wide

Usage for this command

XDCspec declarations sourced in xdc/tools/ICmd.xdc
config String usage[] = [ ];
 
 
ICmd.exec()  // module-wide

xs script entry point

XDCspec declarations sourced in xdc/tools/ICmd.xdc
function exec(args);
 
 
ICmd.main()  // module-wide

xs shell entry point

XDCspec declarations sourced in xdc/tools/ICmd.xdc
function main(args);
 
 
ICmd.run()  // instance

Underlying implementation

XDCspec declarations sourced in xdc/tools/ICmd.xdc
Any run(Cmdr.Instance cmdr, String args[]);
 
generated on Tue, 16 Oct 2012 23:14:44 GMT