Package com.Lomikel.Apps
Class GCLI
java.lang.Object
com.Lomikel.Apps.CLI
com.Lomikel.Apps.GCLI
Groovy Command Line.
- Author:
- J.Hrivnac
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected static org.apache.groovy.groovysh.Groovyshprotected static Bindingprotected static GroovyShellprivate static org.apache.logging.log4j.LoggerLogging . -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()Close.private StringEvaluate command in appropriate groovy shell (GroovyShellorGroovysh).execute()Execute command line in required way.static CommandLineParse the cli arguments.Load standard init files and setup standard environment.org.apache.groovy.groovysh.Groovyshsh()GiveGroovysh.shell()GiveGroovyShell.
-
Field Details
-
_shell
-
_sh
-
log
Logging .
-
Constructor Details
-
GCLI
Create.- Parameters:
scriptSrc- The additional script to be executed.scriptArgs- The arguments for the additional script.
-
-
Method Details
-
execute
Description copied from class:CLIExecute command line in required way. -
close
Description copied from class:CLIClose. -
setupShell
Load standard init files and setup standard environment.- Returns:
- The output of the setup.
-
parseArgs
Parse the cli arguments.- Parameters:
args- The cli arguments.helpMsg- The general help message.- Returns:
- The parsed
CommandLine.
-
evaluate
Evaluate command in appropriate groovy shell (GroovyShellorGroovysh).- Parameters:
cmd- The commands to be evaluated.- Returns:
- The result of the last command.
-
shell
GiveGroovyShell.- Returns:
- The
GroovyShell.
-
sh
GiveGroovysh.- Returns:
- The
Groovysh.
-