|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--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.util.Vector |
compileList
|
Fields inherited from class org.apache.tools.ant.taskdefs.MatchingTask |
fileset, useDefaultExcludes |
Fields inherited from class org.apache.tools.ant.Task |
description, location, project, target, taskName, taskType, wrapper |
Constructor Summary | |
Javac()
|
Method Summary | |
protected void |
addExtdirsToClasspath(Path classpath)
Emulation of extdirs feature in java >= 1.2. |
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. |
protected int |
executeJikesCompile(java.lang.String[] args,
int firstFileName)
Do the compile with the specified arguments. |
protected Path |
getCompileClasspath(boolean addRuntime)
Builds the compilation classpath. |
protected void |
logAndAddFilesToCompile(Commandline cmd)
Logs the compilation parameters, adds the files to compile and logs the &qout;niceSourceList" |
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 |
setOptimize(boolean optimize)
Set the optimize flag. |
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, createInclude, createPatternSet, getDirectoryScanner, setDefaultexcludes, setExcludes, setExcludesfile, setIncludes, setIncludesfile, XsetIgnore, XsetItems |
Methods inherited from class org.apache.tools.ant.Task |
getDescription, getLocation, getOwningTarget, getProject, getRuntimeConfigurableWrapper, getTaskName, init, log, log, maybeConfigure, setDescription, setLocation, setOwningTarget, setRuntimeConfigurableWrapper, setTaskName |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
protected java.util.Vector compileList
Constructor Detail |
public Javac()
Method Detail |
public Path createSrc()
public void setSrcdir(Path srcDir)
public void setDestdir(java.io.File destDir)
public void setClasspath(Path classpath)
public Path createClasspath()
public void setClasspathRef(Reference r)
public void setBootclasspath(Path bootclasspath)
public Path createBootclasspath()
public void setBootClasspathRef(Reference r)
public void setExtdirs(Path extdirs)
public Path createExtdirs()
public void setDeprecation(boolean deprecation)
public void setEncoding(java.lang.String encoding)
public void setDebug(boolean debug)
public void setOptimize(boolean optimize)
public void setDepend(boolean depend)
public void setVerbose(boolean verbose)
public void setTarget(java.lang.String target)
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)
protected Path getCompileClasspath(boolean addRuntime)
addRuntime
- Shall rt.jar
or
classes.zip
be added to the classpath.protected void logAndAddFilesToCompile(Commandline cmd)
protected int executeJikesCompile(java.lang.String[] args, int firstFileName)
args
- - arguments to pass to process on command linefirstFileName
- - index of the first source file in argsprotected void addExtdirsToClasspath(Path classpath)
classpath
- - Path to append files to
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |