public class GroovyMain extends Object
Constructor and Description |
---|
GroovyMain() |
Modifier and Type | Method and Description |
---|---|
protected GroovyCodeSource |
getScriptSource(boolean isScriptFile,
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).
|
String |
getText(String uriOrFilename)
Deprecated.
|
File |
huntForTheScriptFile(String input)
Hunt for the script file by calling searchForGroovyScriptFile(String).
|
static void |
main(String[] args)
Main CLI interface.
|
static File |
searchForGroovyScriptFile(String input)
Search for the script file, doesn't bother if it is named precisely.
|
public static void main(String[] args)
args
- all command line args.public String getText(String uriOrFilename) throws 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
- IOException
protected GroovyCodeSource getScriptSource(boolean isScriptFile, String script) throws IOException, URISyntaxException
isScriptFile
- indicates whether the script parameter is a location or contentscript
- the location or context of the scriptIOException
URISyntaxException
public static File searchForGroovyScriptFile(String input)
public File huntForTheScriptFile(String input)
searchForGroovyScriptFile(String)