org.apache.tools.ant.taskdefs.optional
Class XMLC

java.lang.Object
  |
  +--org.apache.tools.ant.Task
        |
        +--org.apache.tools.ant.taskdefs.MatchingTask
              |
              +--org.apache.tools.ant.taskdefs.optional.XMLC

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

Task to compile XML source files to Java DOMs using XMLC from Enhydra.org. This task can take the following arguments:

Of these arguments, the srcdir and destdir are required.

When this task executes, it will recursively scan the sourcedir and destdir looking for XML source files to compile. By default, files ending with '.html' will be compiled. This can be changed by setting the ext attribute. This task makes its compile decision based on timestamp.

This class is based on org.apache.tools.ant.taskdefs.Javac.

Author:
James Davidson duncan@x180.com, Robin Green greenrd@hotmail.com, Bill Thompson wgthom@softcom.com

Inner classes inherited from class org.apache.tools.ant.taskdefs.MatchingTask
org.apache.tools.ant.taskdefs.MatchingTask.NameEntry
 
Field Summary
protected  java.util.Vector compileList
           
 
Fields inherited from class org.apache.tools.ant.taskdefs.MatchingTask
excludeList, includeList, useDefaultExcludes
 
Fields inherited from class org.apache.tools.ant.Task
description, location, project, target, taskName, taskType
 
Constructor Summary
XMLC()
           
 
Method Summary
 org.apache.tools.ant.Path createClasspath()
          Maybe creates a nested classpath element.
 org.apache.tools.ant.Path createSrc()
          Create a nested element for multiple source path support.
 void execute()
          Executes the task.
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 setClasspath(org.apache.tools.ant.Path classpath)
          Set the classpath to be used for this compilation.
 void setDestdir(java.io.File destDir)
          Set the destination directory into which the Java source files should be compiled.
 void setExt(java.lang.String ext)
          Set extension of the files that will be compiled
 void setInfo(boolean info)
          Set the info flag.
 void setMethods(boolean methods)
          Set the methods flag.
 void setOptions(java.lang.String options)
          Set xmlc options.
 void setPackage(java.lang.String destPackage)
          Set the package that files will be compiled to
 void setParser(java.lang.String parser)
          Set the parser used to parse xml template files.
 void setSrcdir(org.apache.tools.ant.Path srcDir)
          Set the source dirs to find the source Java files.
 
Methods inherited from class org.apache.tools.ant.taskdefs.MatchingTask
createExclude, createInclude, getDirectoryScanner, getProperty, setDefaultexcludes, setExcludes, setExcludesfile, setIgnore, setIncludes, setIncludesfile, setItems
 
Methods inherited from class org.apache.tools.ant.Task
getDescription, getLocation, getOwningTarget, getProject, getTaskName, init, log, log, setDescription, setLocation, setOwningTarget, setTaskName
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

compileList

protected java.util.Vector compileList
Constructor Detail

XMLC

public XMLC()
Method Detail

createSrc

public org.apache.tools.ant.Path createSrc()
Create a nested element for multiple source path support.
Returns:
a nexted src element.

setPackage

public void setPackage(java.lang.String destPackage)
Set the package that files will be compiled to

setExt

public void setExt(java.lang.String ext)
Set extension of the files that will be compiled

setOptions

public void setOptions(java.lang.String options)
Set xmlc options.

setParser

public void setParser(java.lang.String parser)
Set the parser used to parse xml template files.

setMethods

public void setMethods(boolean methods)
Set the methods flag.

setInfo

public void setInfo(boolean info)
Set the info flag.

setSrcdir

public void setSrcdir(org.apache.tools.ant.Path srcDir)
Set the source dirs to find the source Java files.

setDestdir

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

setClasspath

public void setClasspath(org.apache.tools.ant.Path classpath)
Set the classpath to be used for this compilation.

createClasspath

public org.apache.tools.ant.Path createClasspath()
Maybe creates a nested classpath element.

execute

public void execute()
             throws org.apache.tools.ant.BuildException
Executes the task.
Overrides:
execute in class org.apache.tools.ant.Task

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.