|
|||||||||
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
net.sweetohm.ant.util.FileTask
net.sweetohm.ant.xml.InsertTask
public class 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 org.apache.tools.ant.Task |
---|
target, taskName, taskType, wrapper |
Fields inherited from class org.apache.tools.ant.ProjectComponent |
---|
description, location, 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 |
---|
bindToOwner, getOwningTarget, getRuntimeConfigurableWrapper, getTaskName, getTaskType, getWrapper, handleErrorFlush, handleErrorOutput, handleFlush, handleInput, handleOutput, init, isInvalid, log, log, log, log, maybeConfigure, perform, reconfigure, setOwningTarget, setRuntimeConfigurableWrapper, setTaskName, setTaskType |
Methods inherited from class org.apache.tools.ant.ProjectComponent |
---|
clone, getDescription, getLocation, getProject, setDescription, setLocation, setProject |
Methods inherited from class java.lang.Object |
---|
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 insertsource
- The content of the file to insert
java.io.IOException
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |