Save This Page
Home » groovy-src-1.6.3 » org.codehaus » groovy » ant » [javadoc | source]
org.codehaus.groovy.ant
public class: Groovyc [javadoc | source]
java.lang.Object
   org.apache.tools.ant.ProjectComponent
      org.apache.tools.ant.Task
         org.apache.tools.ant.taskdefs.MatchingTask
            org.codehaus.groovy.ant.Groovyc

All Implemented Interfaces:
    SelectorContainer, Cloneable

Compiles Groovy source files. This task can take the following arguments: Of these arguments, the srcdir and destdir are required.

When this task executes, it will recursively scan srcdir and destdir looking for Groovy source files to compile. This task makes its compile decision based on timestamp.

Based heavily on the Javac implementation in Ant.

Field Summary
protected  boolean failOnError     
protected  boolean listFiles     
protected  File[] compileList     
protected  CompilerConfiguration configuration     
Method from org.codehaus.groovy.ant.Groovyc Summary:
addConfiguredJavac,   addToCompileList,   buildClassLoaderFor,   checkParameters,   compile,   createClasspath,   createSourcepath,   createSrc,   execute,   getClasspath,   getDestdir,   getEncoding,   getFailonerror,   getFileList,   getIncludeantruntime,   getIncludejavaruntime,   getListfiles,   getMemoryInitialSize,   getMemoryMaximumSize,   getSourcepath,   getSrcdir,   getStubdir,   getTaskSuccess,   getVerbose,   isIncludeDestClasses,   makeCompileUnit,   recreateSrc,   resetFileLists,   scanDir,   setClasspath,   setClasspathRef,   setDestdir,   setEncoding,   setErrorProperty,   setFailonerror,   setFork,   setIncludeDestClasses,   setIncludeantruntime,   setIncludejavaruntime,   setJavaHome,   setListfiles,   setMemoryInitialSize,   setMemoryMaximumSize,   setProceed,   setSourcepath,   setSourcepathRef,   setSrcdir,   setStacktrace,   setStubdir,   setUpdatedProperty,   setVerbose
Methods from org.apache.tools.ant.taskdefs.MatchingTask:
XsetIgnore,   XsetItems,   add,   addAnd,   addContains,   addContainsRegexp,   addCustom,   addDate,   addDepend,   addDepth,   addDifferent,   addFilename,   addMajority,   addModified,   addNone,   addNot,   addOr,   addPresent,   addSelector,   addSize,   addType,   appendSelector,   createExclude,   createExcludesFile,   createInclude,   createIncludesFile,   createPatternSet,   getSelectors,   hasSelectors,   selectorCount,   selectorElements,   setCaseSensitive,   setDefaultexcludes,   setExcludes,   setExcludesfile,   setFollowSymlinks,   setIncludes,   setIncludesfile,   setProject
Methods from org.apache.tools.ant.Task:
bindToOwner,   execute,   getOwningTarget,   getRuntimeConfigurableWrapper,   getTaskName,   getTaskType,   init,   log,   log,   log,   log,   maybeConfigure,   perform,   reconfigure,   setOwningTarget,   setRuntimeConfigurableWrapper,   setTaskName,   setTaskType
Methods from org.apache.tools.ant.ProjectComponent:
clone,   getDescription,   getLocation,   getProject,   log,   log,   setDescription,   setLocation,   setProject
Methods from java.lang.Object:
equals,   getClass,   hashCode,   notify,   notifyAll,   toString,   wait,   wait,   wait
Method from org.codehaus.groovy.ant.Groovyc Detail:
 public  void addConfiguredJavac(Javac javac) 
    Add the configured nested javac task if present to initiate joint compilation.
 protected  void addToCompileList(File[] newFiles) 
 protected GroovyClassLoader buildClassLoaderFor() 
 protected  void checkParameters() throws BuildException 
 protected  void compile() 
 public Path createClasspath() 
    Adds a path to the classpath.
 public Path createSourcepath() 
    Adds a path to sourcepath.
 public Path createSrc() 
    Adds a path for source compilation.
 public  void execute() throws BuildException 
    Executes the task.
 public Path getClasspath() 
    Gets the classpath to be used for this compilation.
 public File getDestdir() 
    Gets the destination directory into which the java source files should be compiled.
 public String getEncoding() 
    Returns the encoding to be used when creating files.
 public boolean getFailonerror() 
    Gets the failonerror flag.
 public File[] getFileList() 
    Gets the list of files to be compiled.
 public boolean getIncludeantruntime() 
    Gets whether or not the ant classpath is to be included in the classpath.
 public boolean getIncludejavaruntime() 
    Gets whether or not the java runtime should be included in this task's classpath.
 public boolean getListfiles() 
    Get the listfiles flag.
 public String getMemoryInitialSize() 
    Gets the memoryInitialSize flag.
 public String getMemoryMaximumSize() 
    Gets the memoryMaximumSize flag.
 public Path getSourcepath() 
    Gets the sourcepath to be used for this compilation.
 public Path getSrcdir() 
    Gets the source dirs to find the source java files.
 public File getStubdir() 
    Gets the stub directory into which the Java source stub files should be generated
 public boolean getTaskSuccess() 
    Get the result of the groovyc task (success or failure).
 public boolean getVerbose() 
    Gets the verbose flag.
 public boolean isIncludeDestClasses() 
    Get the value of the includeDestClasses property.
 protected CompilationUnit makeCompileUnit() 
 protected Path recreateSrc() 
    Recreate src.
 protected  void resetFileLists() 
    Clear the list of files to be compiled and copied..
 protected  void scanDir(File srcDir,
    File destDir,
    String[] files) 
    Scans the directory looking for source files to be compiled. The results are returned in the class variable compileList
 public  void setClasspath(Path classpath) 
    Set the classpath to be used for this compilation.
 public  void setClasspathRef(Reference r) 
    Adds a reference to a classpath defined elsewhere.
 public  void setDestdir(File destDir) 
    Set the destination directory into which the Java source files should be compiled.
 public  void setEncoding(String encoding) 
    Sets the file encoding for generated files.
 public  void setErrorProperty(String errorProperty) 
    The property to set on compliation failure. This property will be set if the compilation fails.
 public  void setFailonerror(boolean fail) 
    Indicates whether the build will continue even if there are compilation errors; defaults to true.
 public  void setFork(boolean f) 
    If true forks the Groovy compiler.
 public  void setIncludeDestClasses(boolean includeDestClasses) 
    This property controls whether to include the destination classes directory in the classpath given to the compiler. The default value is "true".
 public  void setIncludeantruntime(boolean include) 
    If true, includes Ant's own classpath in the classpath.
 public  void setIncludejavaruntime(boolean include) 
    If true, includes the Java runtime libraries in the classpath.
 public  void setJavaHome(File home) 
    The JDK Home to use when forked.
 public  void setListfiles(boolean list) 
    If true, list the source files being handed off to the compiler.
 public  void setMemoryInitialSize(String memoryInitialSize) 
    The initial size of the memory for the underlying VM if javac is run externally; ignored otherwise. Defaults to the standard VM memory setting. (Examples: 83886080, 81920k, or 80m)
 public  void setMemoryMaximumSize(String memoryMaximumSize) 
    The maximum size of the memory for the underlying VM if javac is run externally; ignored otherwise. Defaults to the standard VM memory setting. (Examples: 83886080, 81920k, or 80m)
 public  void setProceed(boolean proceed) 
 public  void setSourcepath(Path sourcepath) 
    Set the sourcepath to be used for this compilation.
 public  void setSourcepathRef(Reference r) 
    Adds a reference to a source path defined elsewhere.
 public  void setSrcdir(Path srcDir) 
    Set the source directories to find the source Java files.
 public  void setStacktrace(boolean stacktrace) 
    Enable compiler to report stack trace information if a problem occurs during compilation.
 public  void setStubdir(File stubDir) 
    Set the stub directory into which the Java source stub files should be generated. The directory should exist will not be deleted automatically.
 public  void setUpdatedProperty(String updatedProperty) 
    The property to set on compliation success. This property will not be set if the compilation fails, or if there are no files to compile.
 public  void setVerbose(boolean verbose) 
    Enable verbose compiling which will display which files are being compiled