|
||||||||||
| 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
public class 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(java.io.File f)
Checks if a parent directory exists and, if not, creates it. |
void |
execute()
Performs the operation. |
protected void |
processFile(java.lang.String filename)
|
void |
setDbcpSuperclass(java.lang.String sc)
Set the DBCP superclass for the generated class. |
void |
setDbspSuperclass(java.lang.String sc)
Set the DBSP superclass for the generated class. |
void |
setDestdir(java.io.File to)
Sets the destination directory to place .java files. |
void |
setInterfaces(java.lang.String to)
Add a space separated set of interfaces to have generated classes implement. |
void |
setSrcdir(java.io.File to)
Sets the source directory to search for .spt files. |
void |
setSuperclass(java.lang.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(java.io.File to)
public void setDestdir(java.io.File to)
public void setSuperclass(java.lang.String sc)
public void setDbcpSuperclass(java.lang.String sc)
public void setDbspSuperclass(java.lang.String sc)
public void setVerbose(boolean to)
public void execute()
throws org.apache.tools.ant.BuildException
execute in class org.apache.tools.ant.Taskorg.apache.tools.ant.BuildExceptionprotected void processFile(java.lang.String filename)
filename -
protected void checkParent(java.io.File f)
throws org.apache.tools.ant.BuildException
org.apache.tools.ant.BuildExceptionpublic void setInterfaces(java.lang.String to)
to - a space separated list of fully qualified interface names.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||