net.jangaroo.jooc.ant
Class JoocTask

java.lang.Object
  extended by org.apache.tools.ant.ProjectComponent
      extended by org.apache.tools.ant.Task
          extended by org.apache.tools.ant.taskdefs.MatchingTask
              extended by net.jangaroo.jooc.ant.JoocTask
All Implemented Interfaces:
org.apache.tools.ant.types.selectors.SelectorContainer

public class JoocTask
extends org.apache.tools.ant.taskdefs.MatchingTask

Author:
Andreas Gawecki

Field Summary
protected  java.io.File[] compileList
           
protected  boolean failOnError
           
 
Fields inherited from class org.apache.tools.ant.taskdefs.MatchingTask
fileset
 
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
JoocTask()
           
 
Method Summary
protected  void checkParameters()
          Check that all required attributes have been set and nothing silly has been entered.
protected  void compile()
          Perform the compilation.
 org.apache.tools.ant.types.Path createSrc()
          Adds a path for source compilation.
 void execute()
          Executes the task.
 java.io.File getApiDestDir()
           
 java.lang.String getAutoSemicolon()
           
 java.lang.String getClasspath()
          Get the classpath to find joo library files.
 boolean getDebug()
          Gets the debug flag.
 java.lang.String getDebugLevel()
           
 java.io.File getDestdir()
          Get the destination directory into which the java source files should be compiled.
 boolean getEnableassertions()
           
 boolean getFailonerror()
          Gets the failonerror flag.
 java.io.File[] getFileList()
          Gets the list of files to be compiled.
protected  java.lang.String[] getJoocArgs()
           
 org.apache.tools.ant.types.Path getSrcdir()
          Get the source dirs to find the source java files.
 boolean getVerbose()
          Gets the verbose flag.
 boolean isAllowduplicatelocalvariables()
          Gets the allowduplicatelocalvariables flag.
protected  org.apache.tools.ant.types.Path recreateSrc()
          Recreate src.
protected  void resetFileLists()
          Clear the list of files to be compiled and copied..
protected  void scanDir(java.io.File srcDir, java.io.File destDir, java.lang.String[] files)
          Scans the directory looking for source files to be compiled.
 void setAllowduplicatelocalvariables(boolean allowduplicatelocalvariables)
          Sets the allowduplicatelocalvariables flag.
 void setApiDestDir(java.io.File apiDestDir)
           
 void setAutoSemicolon(java.lang.String autoSemicolon)
           
 void setClasspath(java.lang.String classpath)
          Set the classpath to find the joo library files.
 void setDebug(boolean debug)
          Indicates whether source should be compiled with debug information; defaults to off.
 void setDebugLevel(java.lang.String debugLevel)
           
 void setDestdir(java.io.File destDir)
          Set the destination directory into which the Java source files should be compiled.
 void setEnableassertions(boolean enableAssertions)
           
 void setFailonerror(boolean fail)
          Indicates whether the build will continue even if there are compilation errors; defaults to true.
 void setSrcdir(org.apache.tools.ant.types.Path srcDir)
          Set the source directories to find the source joo files.
 void setVerbose(boolean verbose)
          If true, asks the compiler for verbose output.
 
Methods inherited from class org.apache.tools.ant.taskdefs.MatchingTask
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, getDirectoryScanner, getImplicitFileSet, getSelectors, hasSelectors, selectorCount, selectorElements, setCaseSensitive, setDefaultexcludes, setExcludes, setExcludesfile, setFollowSymlinks, setIncludes, setIncludesfile, setProject, XsetIgnore, XsetItems
 
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
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

failOnError

protected boolean failOnError

compileList

protected java.io.File[] compileList
Constructor Detail

JoocTask

public JoocTask()
Method Detail

getEnableassertions

public boolean getEnableassertions()

setEnableassertions

public void setEnableassertions(boolean enableAssertions)

getApiDestDir

public java.io.File getApiDestDir()

setApiDestDir

public void setApiDestDir(java.io.File apiDestDir)

createSrc

public org.apache.tools.ant.types.Path createSrc()
Adds a path for source compilation.

Returns:
a nested src element.

recreateSrc

protected org.apache.tools.ant.types.Path recreateSrc()
Recreate src.

Returns:
a nested src element.

setSrcdir

public void setSrcdir(org.apache.tools.ant.types.Path srcDir)
Set the source directories to find the source joo files.


getSrcdir

public org.apache.tools.ant.types.Path getSrcdir()
Get the source dirs to find the source java files.


setClasspath

public void setClasspath(java.lang.String classpath)
Set the classpath to find the joo library files.


getClasspath

public java.lang.String getClasspath()
Get the classpath to find joo library files.


setDestdir

public void setDestdir(java.io.File destDir)
Set the destination directory into which the Java source files should be compiled.


getDestdir

public java.io.File getDestdir()
Get the destination directory into which the java source files should be compiled.


setFailonerror

public void setFailonerror(boolean fail)
Indicates whether the build will continue even if there are compilation errors; defaults to true.


getFailonerror

public boolean getFailonerror()
Gets the failonerror flag.


isAllowduplicatelocalvariables

public boolean isAllowduplicatelocalvariables()
Gets the allowduplicatelocalvariables flag.


setAllowduplicatelocalvariables

public void setAllowduplicatelocalvariables(boolean allowduplicatelocalvariables)
Sets the allowduplicatelocalvariables flag.


setDebug

public void setDebug(boolean debug)
Indicates whether source should be compiled with debug information; defaults to off.


getDebug

public boolean getDebug()
Gets the debug flag.


getDebugLevel

public java.lang.String getDebugLevel()

setDebugLevel

public void setDebugLevel(java.lang.String debugLevel)

setVerbose

public void setVerbose(boolean verbose)
If true, asks the compiler for verbose output.


getVerbose

public boolean getVerbose()
Gets the verbose flag.


getAutoSemicolon

public java.lang.String getAutoSemicolon()

setAutoSemicolon

public void setAutoSemicolon(java.lang.String autoSemicolon)

execute

public void execute()
             throws org.apache.tools.ant.BuildException
Executes the task.

Overrides:
execute in class org.apache.tools.ant.Task
Throws:
org.apache.tools.ant.BuildException

resetFileLists

protected void resetFileLists()
Clear the list of files to be compiled and copied..


scanDir

protected void scanDir(java.io.File srcDir,
                       java.io.File destDir,
                       java.lang.String[] files)
Scans the directory looking for source files to be compiled. The results are returned in the class variable compileList


getFileList

public java.io.File[] getFileList()
Gets the list of files to be compiled.


checkParameters

protected void checkParameters()
                        throws org.apache.tools.ant.BuildException
Check that all required attributes have been set and nothing silly has been entered.

Throws:
org.apache.tools.ant.BuildException
Since:
Ant 1.5

compile

protected void compile()
Perform the compilation.

Since:
Ant 1.5

getJoocArgs

protected java.lang.String[] getJoocArgs()


Copyright © 2002-2010 CoreMedia AG. All Rights Reserved.