|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.tools.ant.ProjectComponent
org.apache.tools.ant.Task
org.codehaus.groovy.ant.Groovy
public class Groovy
Executes a series of Groovy statements.
Statements can either be read in from a text file using the src attribute or from between the enclosing groovy tags.
Field Summary |
---|
Fields inherited from class org.apache.tools.ant.Task |
---|
description, location, target, taskName, taskType, wrapper |
Fields inherited from class org.apache.tools.ant.ProjectComponent |
---|
project |
Constructor Summary | |
---|---|
Groovy()
|
Method Summary | |
---|---|
protected void |
addClassPathes(GroovyClassLoader classLoader)
Adds the class pathes (if any) |
void |
addFileset(FileSet set)
Adds a set of files (nested fileset attribute). |
void |
addText(String txt)
Set an inline command to execute. |
Commandline.Argument |
createArg()
|
Path |
createClasspath()
Returns a new path element that can be configured. |
protected void |
execGroovy(String txt,
PrintStream out)
Exec the statement. |
void |
execute()
Load the file and then execute it |
Path |
getClasspath()
Gets the classpath. |
protected void |
printResults(PrintStream out)
print any results in the statement. |
protected void |
runStatements(Reader reader,
PrintStream out)
Read in lines and execute them. |
void |
setAppend(boolean append)
Whether output should be appended to or overwrite an existing file. |
void |
setClasspath(Path classpath)
Sets the classpath for loading. |
void |
setClasspathRef(Reference ref)
Set the classpath for loading using the classpath reference. |
void |
setOutput(File output)
Set the output file; optional, defaults to the Ant log. |
void |
setSrc(File srcFile)
Set the name of the file to be run. |
void |
setStacktrace(boolean stacktrace)
Enable compiler to report stack trace information if a problem occurs during compilation. |
Methods inherited from class org.apache.tools.ant.Task |
---|
getDescription, getLocation, getOwningTarget, getRuntimeConfigurableWrapper, getTaskName, getTaskType, getWrapper, handleErrorFlush, handleErrorOutput, handleFlush, handleInput, handleOutput, init, isInvalid, log, log, maybeConfigure, perform, reconfigure, setDescription, setLocation, setOwningTarget, setRuntimeConfigurableWrapper, setTaskName, setTaskType |
Methods inherited from class org.apache.tools.ant.ProjectComponent |
---|
getProject, setProject |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Groovy()
Method Detail |
---|
public void setStacktrace(boolean stacktrace)
stacktrace
- set to true to enable stacktrace reportingpublic void setSrc(File srcFile)
public void addText(String txt)
public void addFileset(FileSet set)
public void setOutput(File output)
public void setAppend(boolean append)
append
- set to true to appendpublic void setClasspath(Path classpath)
classpath
- The classpath to setpublic Path createClasspath()
public void setClasspathRef(Reference ref)
ref
- the refid to usepublic Path getClasspath()
public void execute() throws BuildException
execute
in class Task
BuildException
public Commandline.Argument createArg()
protected void runStatements(Reader reader, PrintStream out) throws IOException
reader
- the reader from which to get the groovy source to exec
IOException
protected void execGroovy(String txt, PrintStream out)
txt
- the groovy source to execprotected void addClassPathes(GroovyClassLoader classLoader)
classLoader
- the classloader to configureprotected void printResults(PrintStream out)
out
- the output PrintStream to print to
|
Copyright © 2003-2007 The Codehaus. All rights reserved. | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |