org.enhydra.barracuda.taskdefs
Class EventBuilder

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
                          |
                          +--org.enhydra.barracuda.taskdefs.EventBuilder

public class EventBuilder
extends org.apache.tools.ant.taskdefs.Javac

This Ant taskdef reads in an xml file that conforms to BarracudaEventBuilder.dtd and generates a set of event classes according to the specified structure. The primary benefit of this is that it makes it very easy to declaratively define event hierarchies that still get compiled to real Java classes (thereby retaining the benefits of strong typing which you get through the manual approach)

This taskdef extends the Javac taskdef, so you should refer to that documentation for paramters that affect compilation.

This taskdef provides one additional descriptor parameter which should refer to the location of a valid xml file describing the event hierarchy.

Look at the Barracuda build.xml file for further usage examples.

Author:
Christian Cryder christianc@enhydra.org

Field Summary
protected  java.lang.String parserClass
           
protected  java.io.File xmlFile
           
 
Fields inherited from class org.apache.tools.ant.taskdefs.Javac
compileList, 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
EventBuilder()
           
 
Method Summary
 void execute()
          Parse the specified event.xml file, generate event classes from it, and then compile the resulting classes.
 void setDescriptor(java.io.File xmlFile)
          Sets the xml event descriptor file.
 
Methods inherited from class org.apache.tools.ant.taskdefs.Javac
createBootclasspath, createClasspath, createExtdirs, createSrc, getBootclasspath, getClasspath, getDebug, getDepend, getDeprecation, getDestdir, getEncoding, getExtdirs, getFailonerror, getFileList, getIncludeantruntime, getIncludejavaruntime, getMemoryInitialSize, getMemoryMaximumSize, getNowarn, getOptimize, getSource, getSrcdir, getTarget, getVerbose, isForkedJavac, isJdkCompiler, resetFileLists, scanDir, setBootclasspath, setBootClasspathRef, setClasspath, setClasspathRef, setDebug, setDepend, setDeprecation, setDestdir, setEncoding, setExtdirs, setFailonerror, setFork, setIncludeantruntime, setIncludejavaruntime, setMemoryInitialSize, setMemoryMaximumSize, setNowarn, setOptimize, setProceed, setSource, setSrcdir, setTarget, setVerbose
 
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

parserClass

protected java.lang.String parserClass

xmlFile

protected java.io.File xmlFile
Constructor Detail

EventBuilder

public EventBuilder()
Method Detail

setDescriptor

public void setDescriptor(java.io.File xmlFile)
Sets the xml event descriptor file.


execute

public void execute()
             throws org.apache.tools.ant.BuildException
Parse the specified event.xml file, generate event classes from it, and then compile the resulting classes.

Overrides:
execute in class org.apache.tools.ant.taskdefs.Javac
org.apache.tools.ant.BuildException


Copyright © 2001 Enhydra.org