|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectorg.apache.tools.ant.ProjectComponent
org.apache.tools.ant.Task
org.apache.tools.ant.taskdefs.MatchingTask
net.spy.ant.SPGenTask
Generates Java code from SPT files. This is an Ant task that recurses a directory and invokes net.spy.util.SPGen on .spt files to generate Java code. It does the usual stuff expected of a Make-style tool: leaving up-to-date .java files intact, creating output with a temporary file until it is finished so partial builds don't create problems, etc.
Example ant build entry:
<target name="spfiles">
<taskdef name="spgen" classname="net.spy.util.SPGenTask">
<classpath refid="compile.classpath"/>
</taskdef>
<spgen srcdir="${spt.dir}" destdir="${spt.dir}"
superclass="com.foo.MyDbsp"/>
</target>
| Field Summary |
| Fields inherited from class org.apache.tools.ant.taskdefs.MatchingTask |
fileset |
| 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 | |
SPGenTask()
|
|
| Method Summary | |
protected void |
checkParent(File f)
Checks if a parent directory exists and, if not, creates it. |
void |
execute()
Performs the operation. |
protected void |
processFile(String filename)
Processes an individual file. |
void |
setDbcpSuperclass(String sc)
Set the DBCP superclass for the generated class. |
void |
setDbspSuperclass(String sc)
Set the DBSP superclass for the generated class. |
void |
setDestdir(File destDir)
Sets the destination directory to place .java files. |
void |
setSrcdir(File srcDir)
Sets the source directory to search for .spt files. |
void |
setSuperclass(String sc)
Set the superclass for the generated class. |
void |
setVerbose(boolean to)
True if we want verbose transformations. |
| Methods inherited from class org.apache.tools.ant.taskdefs.MatchingTask |
add, addAnd, addContains, addContainsRegexp, addCustom, addDate, addDepend, addDepth, addDifferent, addFilename, addMajority, addModified, addNone, addNot, addOr, addPresent, addSelector, addSize, addType, appendSelector, createExclude, createExcludesFile, createInclude, createIncludesFile, createPatternSet, getDirectoryScanner, getImplicitFileSet, getSelectors, hasSelectors, selectorCount, selectorElements, setCaseSensitive, setDefaultexcludes, setExcludes, setExcludesfile, setFollowSymlinks, setIncludes, setIncludesfile, setProject, XsetIgnore, XsetItems |
| Methods inherited from class org.apache.tools.ant.Task |
getDescription, getLocation, getOwningTarget, getRuntimeConfigurableWrapper, getTaskName, getTaskType, getWrapper, handleErrorFlush, handleErrorOutput, handleFlush, handleInput, handleOutput, init, isInvalid, log, log, maybeConfigure, perform, reconfigure, setDescription, setLocation, setOwningTarget, setRuntimeConfigurableWrapper, setTaskName, setTaskType |
| Methods inherited from class org.apache.tools.ant.ProjectComponent |
getProject |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public SPGenTask()
| Method Detail |
public void setSrcdir(File srcDir)
public void setDestdir(File destDir)
public void setSuperclass(String sc)
public void setDbcpSuperclass(String sc)
public void setDbspSuperclass(String sc)
public void setVerbose(boolean to)
public void execute()
throws org.apache.tools.ant.BuildException
org.apache.tools.ant.BuildExceptionprotected void processFile(String filename)
filename - The filename, relative to the source directory.
protected void checkParent(File f)
throws org.apache.tools.ant.BuildException
org.apache.tools.ant.BuildException
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||