org.apache.tools.ant.taskdefs.optional

Class PropertyFile

public class PropertyFile extends Task

Modifies settings in a property file.

The following is an example of its usage:

Nested Class Summary
static classPropertyFile.Entry
Instance of this class represents nested elements of a task propertyfile.
static classPropertyFile.Unit
Borrowed from Tstamp
Method Summary
PropertyFile.EntrycreateEntry()
The entry nested element.
voidexecute()
Execute the task.
voidsetComment(String hdr)
optional header comment for the file
voidsetFile(File file)
Location of the property file to be edited; required.

Method Detail

createEntry

public PropertyFile.Entry createEntry()
The entry nested element.

Returns: an entry nested element to be configured.

execute

public void execute()
Execute the task.

Throws: BuildException on error.

setComment

public void setComment(String hdr)
optional header comment for the file

Parameters: hdr the string to use for the comment.

setFile

public void setFile(File file)
Location of the property file to be edited; required.

Parameters: file the property file.