public class GroovyMain
extends java.lang.Object
Constructor and Description |
---|
GroovyMain() |
Modifier and Type | Method and Description |
---|---|
protected GroovyCodeSource |
getScriptSource(boolean isScriptFile,
java.lang.String script)
Get a new GroovyCodeSource for a script which may be given as a location
(isScript is true) or as text (isScript is false).
|
java.lang.String |
getText(java.lang.String uriOrFilename)
Deprecated.
|
java.io.File |
huntForTheScriptFile(java.lang.String input)
Hunt for the script file by calling searchForGroovyScriptFile(String).
|
static void |
main(java.lang.String[] args)
Main CLI interface.
|
static java.io.File |
searchForGroovyScriptFile(java.lang.String input)
Search for the script file, doesn't bother if it is named precisely.
|
public static void main(java.lang.String[] args)
args
- all command line args.@Deprecated public java.lang.String getText(java.lang.String uriOrFilename) throws java.io.IOException
huntForTheScriptFile(String)
is called to try
with some Groovy extensions appended.
This method is not used to process scripts and is retained for backward
compatibility. If you want to modify how GroovyMain processes scripts
then use getScriptSource(boolean, String)
.uriOrFilename
- java.io.IOException
protected GroovyCodeSource getScriptSource(boolean isScriptFile, java.lang.String script) throws java.io.IOException, java.net.URISyntaxException
isScriptFile
- indicates whether the script parameter is a location or contentscript
- the location or context of the scriptjava.io.IOException
java.net.URISyntaxException
public static java.io.File searchForGroovyScriptFile(java.lang.String input)
public java.io.File huntForTheScriptFile(java.lang.String input)
searchForGroovyScriptFile(String)