| java.lang.Object kawa.Shell
Shell | public class Shell (Code) | | Utility functions (static methods) for kawa.repl.
Should probably be merged with kawa.repl. FIXME.
|
Field Summary | |
public static Object[] | defaultFormatInfo | public static java.lang.reflect.Method | defaultFormatMethod | public static String | defaultFormatName | static Object[][] | formats A table of names of known output formats.
For each entry, the first Object is the format name.
The next entries are a class name, the name of a static method in that
class, and the parameter types (as a Class[] suitable for getMethod).
The remain values are arguments (passed to invoke), except that if an
argument is the spacial value portArg, it is replaced by the
destination OutPort. |
Method Summary | |
public static Consumer | getOutputConsumer(OutPort out) Return a Consumer that formats using the appropriate format. | public static void | run(Language language, Environment env) | public static void | run(Language language, Environment env, InPort inp, OutPort pout, OutPort perr) | public static void | run(Language language, Environment env, InPort inp, Consumer out, OutPort perr, java.net.URL url) | public static void | runFile(String fname, int skipLines) | public static void | runString(String str, Language language, Environment env) | public static void | setDefaultFormat(String name) Specify the default output format. |
defaultFormatInfo | public static Object[] defaultFormatInfo(Code) | | |
defaultFormatName | public static String defaultFormatName(Code) | | |
formats | static Object[][] formats(Code) | | A table of names of known output formats.
For each entry, the first Object is the format name.
The next entries are a class name, the name of a static method in that
class, and the parameter types (as a Class[] suitable for getMethod).
The remain values are arguments (passed to invoke), except that if an
argument is the spacial value portArg, it is replaced by the
destination OutPort.
|
getOutputConsumer | public static Consumer getOutputConsumer(OutPort out)(Code) | | Return a Consumer that formats using the appropriate format.
The format is chosen depending on specified defaults.
Parameters: out - The output where formatted output is sent to. |
runFile | public static void runFile(String fname, int skipLines)(Code) | | |
setDefaultFormat | public static void setDefaultFormat(String name)(Code) | | Specify the default output format.
Parameters: name - The name of the format, as an entry in the formats table. |
|
|