org.apache.tools.ant.taskdefs.condition

Class AntVersion

public class AntVersion extends Task implements Condition

An Ant version condition.

Since: Ant 1.7

Method Summary
booleaneval()
Evalute the condition.
voidexecute()
Run as a task.
StringgetAtLeast()
Get the atleast attribute.
StringgetExactly()
Get the exactly attribute.
StringgetProperty()
Get the name of the property to hold the ant version.
voidsetAtLeast(String atLeast)
Set the atleast attribute.
voidsetExactly(String exactly)
Set the exactly attribute.
voidsetProperty(String propertyname)
Set the name of the property to hold the ant version.

Method Detail

eval

public boolean eval()
Evalute the condition.

Returns: true if the condition is true.

Throws: BuildException if an error occurs.

execute

public void execute()
Run as a task.

Throws: BuildException if an error occurs.

getAtLeast

public String getAtLeast()
Get the atleast attribute.

Returns: the atleast attribute.

getExactly

public String getExactly()
Get the exactly attribute.

Returns: the exactly attribute.

getProperty

public String getProperty()
Get the name of the property to hold the ant version.

Returns: the name of the property.

setAtLeast

public void setAtLeast(String atLeast)
Set the atleast attribute. This is of the form major.minor.point. For example 1.7.0.

Parameters: atLeast the version to check against.

setExactly

public void setExactly(String exactly)
Set the exactly attribute. This is of the form major.minor.point. For example 1.7.0.

Parameters: exactly the version to check against.

setProperty

public void setProperty(String propertyname)
Set the name of the property to hold the ant version.

Parameters: propertyname the name of the property.