|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.apache.tools.ant.ProjectComponent | +--org.apache.tools.ant.Task | +--net.sweetohm.ant.util.FileTask | +--net.sweetohm.ant.xml.InsertTask
This task replace a given processing instruction with the content of a given file.
Field Summary | |
(package private) java.util.Vector |
files
The list of files to process |
(package private) java.lang.String |
pattern
Processing instruction to search |
(package private) java.lang.String |
pi
Processing instruction to search for |
(package private) java.io.File |
source
The file to insert |
Fields inherited from class net.sweetohm.ant.util.FileTask |
|
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 | |
InsertTask()
Empty constructor (needed for reflexion). |
Method Summary | |
void |
execute()
The method to launch the program as an Ant task. |
(package private) void |
insert(java.lang.String string,
java.io.File file,
java.lang.String content)
Insert the PI with the content of the file |
(package private) void |
processFile(java.io.File file,
java.lang.String content)
Process a single file |
void |
setPattern(java.lang.String pattern)
Pattern setter. |
void |
setSource(java.lang.String source)
Source setter. |
Methods inherited from class net.sweetohm.ant.util.FileTask |
addFileset, getFiles, setDir, setFile |
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 |
java.lang.String pattern
java.lang.String pi
java.util.Vector files
java.io.File source
Constructor Detail |
public InsertTask()
Method Detail |
public void setPattern(java.lang.String pattern)
pattern
- The pattern to search.public void setSource(java.lang.String source)
source
- The source file to insert.public void execute()
execute
in class org.apache.tools.ant.Task
void processFile(java.io.File file, java.lang.String content) throws java.io.IOException
file
- The file to process
java.io.IOException
void insert(java.lang.String string, java.io.File file, java.lang.String content) throws java.io.IOException
string
- The content of the filefile
- The file to insert
java.io.IOException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |