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.Groovysh
protected static Binding
protected static GroovyShell
private static org.apache.logging.log4j.Logger
Logging . -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
close()
Close.private String
Evaluate command in appropriate groovy shell (GroovyShell
orGroovysh
).execute()
Execute command line in required way.static CommandLine
Parse the cli arguments.Load standard init files and setup standard environment.org.apache.groovy.groovysh.Groovysh
sh()
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:CLI
Execute command line in required way. -
close
Description copied from class:CLI
Close. -
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 (GroovyShell
orGroovysh
).- Parameters:
cmd
- The commands to be evaluated.- Returns:
- The result of the last command.
-
shell
GiveGroovyShell
.- Returns:
- The
GroovyShell
.
-
sh
GiveGroovysh
.- Returns:
- The
Groovysh
.
-