public class EvalScript
extends groovy.lang.Script
implements groovy.lang.GroovyObject
Modifier and Type | Field and Description |
---|---|
org.slf4j.Logger |
logger |
Constructor and Description |
---|
EvalScript() |
Modifier and Type | Method and Description |
---|---|
org.apache.tools.ant.Task |
ant(groovy.lang.Closure<?> block)
Invoke an Ant block.
|
void |
defaultTarget(String name) |
void |
defaultTarget(org.apache.tools.ant.Target target) |
Object |
evalScript(File file)
Evaluate another script.
|
Object |
evalScript(String fn)
Evaluate another script.
|
groovy.util.AntBuilder |
getAnt()
Get the Ant builder.
|
org.apache.tools.ant.Project |
getAntProject()
Get the Ant project.
|
EvalConfig |
getConfig() |
EvalScriptEngine |
getEngine()
Get the engine in use for this script.
|
EvalScript |
getEval()
Get the evaluator script.
|
EvalProject |
getProject()
Get the eval project configured by this script.
|
List<String> |
glob(String globPattern)
Performs a file search based upon the parameter glob pattern.
|
List<String> |
glob(String globPattern,
String baseDir)
Performs a file search based upon the parameter glob pattern.
|
Object |
methodMissing(String name,
Object arg) |
Object |
run() |
void |
setEngine(EvalScriptEngine ece)
Set the engine this script should use.
|
void |
setProject(EvalProject prj)
Set the eval project to be configured by this script.
|
EvalTarget |
target(String name,
groovy.lang.Closure<?> closure) |
evaluate, evaluate, getBinding, getProperty, invokeMethod, print, printf, printf, println, println, run, setBinding, setProperty
public EvalConfig getConfig()
public EvalScriptEngine getEngine()
public void setEngine(EvalScriptEngine ece)
ece
- The engine to be used by this script.public EvalProject getProject()
IllegalStateException
- if no eval project has been configured.setProject(EvalProject)
public void setProject(EvalProject prj)
prj
- The eval project to configure.public EvalScript getEval()
public org.apache.tools.ant.Project getAntProject()
public groovy.util.AntBuilder getAnt()
public org.apache.tools.ant.Task ant(groovy.lang.Closure<?> block)
public Object evalScript(File file) throws IOException, TaskExecutionException
file
- The script to evaluate.IOException
TaskExecutionException
public Object evalScript(String fn) throws IOException, TaskExecutionException
fn
- The script to evaluate.IOException
TaskExecutionException
public List<String> glob(String globPattern)
globPattern
- String in glob syntax giving the glob to expand.public List<String> glob(String globPattern, String baseDir)
globPattern
- String in glob syntax giving the glob to expand.baseDir
- The base directory from which to search.public EvalTarget target(String name, @DelegatesTo(value=TargetDelegate.class,strategy=1) groovy.lang.Closure<?> closure)
public void defaultTarget(String name)
public void defaultTarget(org.apache.tools.ant.Target target)
public Object run()
run
in class groovy.lang.Script