org.apache.tools.ant.taskdefs.compilers
Class DefaultCompilerAdapter

java.lang.Object
  |
  +--org.apache.tools.ant.taskdefs.compilers.DefaultCompilerAdapter
All Implemented Interfaces:
CompilerAdapter
Direct Known Subclasses:
Javac12, Javac13, Jikes, Jvc

public abstract class DefaultCompilerAdapter
extends java.lang.Object
implements CompilerAdapter

This is the default implementation for the CompilerAdapter interface. Currently, this is a cut-and-paste of the original javac task.

Author:
James Davidson duncan@x180.com, Robin Green greenrd@hotmail.com, Stefan Bodewig, J D Glanville

Field Summary
protected  Javac attributes
           
protected  Path bootclasspath
           
protected  Path compileClasspath
           
protected  java.io.File[] compileList
           
protected  boolean debug
           
protected  boolean depend
           
protected  boolean deprecation
           
protected  java.io.File destDir
           
protected  java.lang.String encoding
           
protected  Path extdirs
           
protected  boolean includeAntRuntime
           
protected  boolean includeJavaRuntime
           
protected  Location location
           
protected static java.lang.String lSep
           
protected  boolean optimize
           
protected  Project project
           
protected  Path src
           
protected  java.lang.String target
           
protected  boolean verbose
           
 
Constructor Summary
DefaultCompilerAdapter()
           
 
Method Summary
protected  void addExtdirsToClasspath(Path classpath)
          Emulation of extdirs feature in java >= 1.2.
protected  int executeExternalCompile(java.lang.String[] args, int firstFileName)
          Do the compile with the specified arguments.
protected  Path getCompileClasspath()
          Builds the compilation classpath.
 Javac getJavac()
           
protected  void logAndAddFilesToCompile(Commandline cmd)
          Logs the compilation parameters, adds the files to compile and logs the &qout;niceSourceList"
 void setJavac(Javac attributes)
          Sets the compiler attributes, which are stored in the Javac task.
protected  Commandline setupJavacCommand()
          Does the command line argument processing common to classic and modern.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.apache.tools.ant.taskdefs.compilers.CompilerAdapter
execute
 

Field Detail

src

protected Path src

destDir

protected java.io.File destDir

encoding

protected java.lang.String encoding

debug

protected boolean debug

optimize

protected boolean optimize

deprecation

protected boolean deprecation

depend

protected boolean depend

verbose

protected boolean verbose

target

protected java.lang.String target

bootclasspath

protected Path bootclasspath

extdirs

protected Path extdirs

compileClasspath

protected Path compileClasspath

project

protected Project project

location

protected Location location

includeAntRuntime

protected boolean includeAntRuntime

includeJavaRuntime

protected boolean includeJavaRuntime

compileList

protected java.io.File[] compileList

lSep

protected static java.lang.String lSep

attributes

protected Javac attributes
Constructor Detail

DefaultCompilerAdapter

public DefaultCompilerAdapter()
Method Detail

setJavac

public void setJavac(Javac attributes)
Description copied from interface: CompilerAdapter
Sets the compiler attributes, which are stored in the Javac task.
Specified by:
setJavac in interface CompilerAdapter

getJavac

public Javac getJavac()

getCompileClasspath

protected Path getCompileClasspath()
Builds the compilation classpath.

setupJavacCommand

protected Commandline setupJavacCommand()
Does the command line argument processing common to classic and modern.

logAndAddFilesToCompile

protected void logAndAddFilesToCompile(Commandline cmd)
Logs the compilation parameters, adds the files to compile and logs the &qout;niceSourceList"

executeExternalCompile

protected int executeExternalCompile(java.lang.String[] args,
                                     int firstFileName)
Do the compile with the specified arguments.
Parameters:
args - - arguments to pass to process on command line
firstFileName - - index of the first source file in args

addExtdirsToClasspath

protected void addExtdirsToClasspath(Path classpath)
Emulation of extdirs feature in java >= 1.2. This method adds all files in the given directories (but not in sub-directories!) to the classpath, so that you don't have to specify them all one by one.
Parameters:
classpath - - Path to append files to


Copyright ? 2000 Apache Software Foundation. All Rights Reserved.