|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.apache.tools.ant.ProjectComponent | +--org.apache.tools.ant.Task | +--org.apache.tools.ant.taskdefs.MatchingTask | +--org.apache.tools.ant.taskdefs.Javac
Task to compile Java source files. This task can take the following arguments:
When this task executes, it will recursively scan the sourcedir and destdir looking for Java source files to compile. This task makes its compile decision based on timestamp.
Field Summary | |
protected java.io.File[] |
compileList
|
protected boolean |
failOnError
|
Fields inherited from class org.apache.tools.ant.taskdefs.MatchingTask |
fileset, useDefaultExcludes |
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 | |
Javac()
|
Method Summary | |
Path |
createBootclasspath()
Maybe creates a nested classpath element. |
Path |
createClasspath()
Maybe creates a nested classpath element. |
Path |
createExtdirs()
Maybe creates a nested classpath element. |
Path |
createSrc()
Create a nested |
void |
execute()
Executes the task. |
Path |
getBootclasspath()
Gets the bootclasspath that will be used to compile the classes against. |
Path |
getClasspath()
Gets the classpath to be used for this compilation. |
boolean |
getDebug()
Gets the debug flag. |
boolean |
getDepend()
Gets the depend flag. |
boolean |
getDeprecation()
Gets the deprecation flag. |
java.io.File |
getDestdir()
Gets the destination directory into which the java source files should be compiled. |
java.lang.String |
getEncoding()
Gets the java source file encoding name. |
Path |
getExtdirs()
Gets the extension directories that will be used during the compilation. |
boolean |
getFailonerror()
Gets the failonerror flag. |
java.io.File[] |
getFileList()
Gets the list of files to be compiled. |
boolean |
getIncludeantruntime()
Gets whether or not the ant classpath is to be included in the task's classpath. |
boolean |
getIncludejavaruntime()
Gets whether or not the java runtime should be included in this task's classpath. |
java.lang.String |
getMemoryInitialSize()
Gets the memoryInitialSize flag. |
java.lang.String |
getMemoryMaximumSize()
Gets the memoryMaximumSize flag. |
boolean |
getNowarn()
Should the -nowarn option be used. |
boolean |
getOptimize()
Gets the optimize flag. |
java.lang.String |
getSource()
Get the value of source. |
Path |
getSrcdir()
Gets the source dirs to find the source java files. |
java.lang.String |
getTarget()
Gets the target VM that the classes will be compiled for. |
boolean |
getVerbose()
Gets the verbose flag. |
boolean |
isForkedJavac()
Is this a forked invocation of JDK's javac? |
protected boolean |
isJdkCompiler(java.lang.String compiler)
|
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 |
setBootclasspath(Path bootclasspath)
Sets the bootclasspath that will be used to compile the classes against. |
void |
setBootClasspathRef(Reference r)
Adds a reference to a CLASSPATH defined elsewhere. |
void |
setClasspath(Path classpath)
Set the classpath to be used for this compilation. |
void |
setClasspathRef(Reference r)
Adds a reference to a CLASSPATH defined elsewhere. |
void |
setDebug(boolean debug)
Set the debug flag. |
void |
setDepend(boolean depend)
Set the depend flag. |
void |
setDeprecation(boolean deprecation)
Set the deprecation flag. |
void |
setDestdir(java.io.File destDir)
Set the destination directory into which the Java source files should be compiled. |
void |
setEncoding(java.lang.String encoding)
Set the Java source file encoding name. |
void |
setExtdirs(Path extdirs)
Sets the extension directories that will be used during the compilation. |
void |
setFailonerror(boolean fail)
Throw a BuildException if compilation fails |
void |
setFork(boolean fork)
Sets whether to fork the javac compiler. |
void |
setIncludeantruntime(boolean include)
Include ant's own classpath in this task's classpath? |
void |
setIncludejavaruntime(boolean include)
Sets whether or not to include the java runtime libraries to this task's classpath. |
void |
setMemoryInitialSize(java.lang.String memoryInitialSize)
Set the memoryInitialSize flag. |
void |
setMemoryMaximumSize(java.lang.String memoryMaximumSize)
Set the memoryMaximumSize flag. |
void |
setNowarn(boolean flag)
Sets whether the -nowarn option should be used. |
void |
setOptimize(boolean optimize)
Set the optimize flag. |
void |
setProceed(boolean proceed)
Proceed if compilation fails |
void |
setSource(java.lang.String v)
Set the value of source. |
void |
setSrcdir(Path srcDir)
Set the source dirs to find the source Java files. |
void |
setTarget(java.lang.String target)
Sets the target VM that the classes will be compiled for. |
void |
setVerbose(boolean verbose)
Set the verbose flag. |
Methods inherited from class org.apache.tools.ant.taskdefs.MatchingTask |
createExclude, createExcludesFile, createInclude, createIncludesFile, createPatternSet, getDirectoryScanner, setDefaultexcludes, setExcludes, setExcludesfile, setIncludes, setIncludesfile, XsetIgnore, XsetItems |
Methods inherited from class org.apache.tools.ant.Task |
getDescription, getLocation, getOwningTarget, getRuntimeConfigurableWrapper, getTaskName, handleErrorOutput, handleOutput, init, log, log, maybeConfigure, perform, setDescription, setLocation, setOwningTarget, setRuntimeConfigurableWrapper, setTaskName |
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 |
Field Detail |
protected boolean failOnError
protected java.io.File[] compileList
Constructor Detail |
public Javac()
Method Detail |
public java.lang.String getSource()
public void setSource(java.lang.String v)
v
- Value to assign to source.public Path createSrc()
public void setSrcdir(Path srcDir)
public Path getSrcdir()
public void setDestdir(java.io.File destDir)
public java.io.File getDestdir()
public void setClasspath(Path classpath)
public Path getClasspath()
public Path createClasspath()
public void setClasspathRef(Reference r)
public void setBootclasspath(Path bootclasspath)
public Path getBootclasspath()
public Path createBootclasspath()
public void setBootClasspathRef(Reference r)
public void setExtdirs(Path extdirs)
public Path getExtdirs()
public Path createExtdirs()
public void setFailonerror(boolean fail)
public void setProceed(boolean proceed)
public boolean getFailonerror()
public void setDeprecation(boolean deprecation)
public boolean getDeprecation()
public void setMemoryInitialSize(java.lang.String memoryInitialSize)
public java.lang.String getMemoryInitialSize()
public void setMemoryMaximumSize(java.lang.String memoryMaximumSize)
public java.lang.String getMemoryMaximumSize()
public void setEncoding(java.lang.String encoding)
public java.lang.String getEncoding()
public void setDebug(boolean debug)
public boolean getDebug()
public void setOptimize(boolean optimize)
public boolean getOptimize()
public void setDepend(boolean depend)
public boolean getDepend()
public void setVerbose(boolean verbose)
public boolean getVerbose()
public void setTarget(java.lang.String target)
public java.lang.String getTarget()
public void setIncludeantruntime(boolean include)
public boolean getIncludeantruntime()
public void setIncludejavaruntime(boolean include)
public boolean getIncludejavaruntime()
public void setFork(boolean fork)
public boolean isForkedJavac()
public void setNowarn(boolean flag)
public boolean getNowarn()
public void execute() throws BuildException
execute
in class Task
org.apache.tools.ant.Task
BuildException
- if someting goes wrong with the buildprotected void resetFileLists()
protected void scanDir(java.io.File srcDir, java.io.File destDir, java.lang.String[] files)
public java.io.File[] getFileList()
protected boolean isJdkCompiler(java.lang.String compiler)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |