public class GroovyCodeSource extends Object
| Constructor and Description | 
|---|
GroovyCodeSource(File infile)  | 
GroovyCodeSource(File infile,
                String encoding)  | 
GroovyCodeSource(InputStream inputStream,
                String name,
                String codeBase)
Deprecated. 
 
Prefer using methods taking a Reader rather than an InputStream to avoid wrong encoding issues. 
 | 
GroovyCodeSource(Reader reader,
                String name,
                String codeBase)
Construct a GroovyCodeSource for an inputStream of groovyCode that has an
 unknown provenance -- meaning it didn't come from a File or a URL (e.g. 
 | 
GroovyCodeSource(String script,
                String name,
                String codeBase)  | 
GroovyCodeSource(URL url)  | 
| Modifier and Type | Method and Description | 
|---|---|
File | 
getFile()  | 
InputStream | 
getInputStream()
Deprecated. 
 
Prefer using methods taking a Reader rather than an InputStream to avoid wrong encoding issues. 
 | 
String | 
getName()  | 
String | 
getScriptText()  | 
boolean | 
isCachable()  | 
void | 
setCachable(boolean b)  | 
public GroovyCodeSource(Reader reader, String name, String codeBase)
@Deprecated public GroovyCodeSource(InputStream inputStream, String name, String codeBase)
public GroovyCodeSource(File infile, String encoding) throws IOException
IOExceptionpublic GroovyCodeSource(File infile) throws IOException
infile - the file to create a GroovyCodeSource for.IOException - if an issue arises opening and reading the file.public GroovyCodeSource(URL url) throws IOException
IOException@Deprecated public InputStream getInputStream()
public String getScriptText()
public String getName()
public File getFile()
public void setCachable(boolean b)
public boolean isCachable()