|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectgroovy.ui.GroovyMain
A Command line to execute groovy.
Field Summary | |
private java.util.List |
args
|
private boolean |
autoOutput
|
private java.lang.String |
backupExtension
|
private CompilerConfiguration |
conf
|
private boolean |
debug
|
private boolean |
editFiles
|
private boolean |
isScriptFile
|
private int |
port
|
private boolean |
processFiles
|
private boolean |
processSockets
|
private java.lang.String |
script
|
Constructor Summary | |
GroovyMain()
|
Method Summary | |
private static org.apache.commons.cli.Options |
buildOptions()
Build the options parser. |
private java.io.File |
huntForTheScriptFile(java.lang.String scriptFileName)
Hunt for the script file, doesn't bother if it is named precisely. |
static void |
main(java.lang.String[] args)
Main CLI interface. |
private static org.apache.commons.cli.CommandLine |
parseCommandLine(org.apache.commons.cli.Options options,
java.lang.String[] args)
Parse the command line. |
private static boolean |
process(org.apache.commons.cli.CommandLine line)
Process the users request. |
private void |
processFile(Script s,
java.io.File file)
Process a single input file. |
private void |
processFiles()
Process the input files. |
private void |
processOnce()
Process the standard, single script with args. |
private void |
processReader(Script s,
java.io.BufferedReader reader,
java.io.PrintWriter pw)
Process a script against a single input file. |
private void |
processSockets()
Process Sockets. |
private boolean |
run()
Run the script. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
private java.util.List args
private boolean isScriptFile
private java.lang.String script
private boolean processFiles
private boolean editFiles
private boolean autoOutput
private boolean processSockets
private int port
private java.lang.String backupExtension
private boolean debug
private CompilerConfiguration conf
Constructor Detail |
public GroovyMain()
Method Detail |
public static void main(java.lang.String[] args)
args
- all command line args.private static org.apache.commons.cli.CommandLine parseCommandLine(org.apache.commons.cli.Options options, java.lang.String[] args) throws org.apache.commons.cli.ParseException
options
- the options parser.args
- the command line args.
org.apache.commons.cli.ParseException
- if there was a problem.private static org.apache.commons.cli.Options buildOptions()
private static boolean process(org.apache.commons.cli.CommandLine line) throws org.apache.commons.cli.ParseException
line
- the parsed command line.
org.apache.commons.cli.ParseException
- if invalid options are chosenprivate boolean run()
private void processSockets() throws CompilationFailedException, java.io.IOException
CompilationFailedException
java.io.IOException
private java.io.File huntForTheScriptFile(java.lang.String scriptFileName)
private void processFiles() throws CompilationFailedException, java.io.IOException
CompilationFailedException
java.io.IOException
private void processFile(Script s, java.io.File file) throws java.io.IOException
s
- the script to execute.file
- the input file.
java.io.IOException
private void processReader(Script s, java.io.BufferedReader reader, java.io.PrintWriter pw) throws java.io.IOException
s
- script to execute.reader
- input file.pw
- output sink.
java.io.IOException
private void processOnce() throws CompilationFailedException, java.io.IOException
CompilationFailedException
java.io.IOException
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |