Top Description Fields Constructors Methods
org.apache.tools.ant.taskdefs.condition

public Class JavaVersion

extends Object
implements Condition
Class Inheritance
All Implemented Interfaces
org.apache.tools.ant.taskdefs.condition.Condition
Imports
org.apache.tools.ant.BuildException, org.apache.tools.ant.util.DeweyDecimal, .JavaEnvUtils

An Java version condition.
Since
Ant 1.10.2

Field Summary

Modifier and TypeField and Description
private String
private String
private String

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public boolean

Returns:

true if the condition is true.
eval
()

Implements org.apache.tools.ant.taskdefs.condition.Condition.eval.

Evaluate the condition.
public String

Returns:

the atleast attribute.
getAtLeast
()

Get the atleast attribute.

public String

Returns:

the atmost attribute.
getAtMost
()

Get the atmost attribute.

public String

Returns:

the exactly attribute.
getExactly
()

Get the exactly attribute.

public void
setAtLeast(String
the version to set
atLeast
)

Set the atleast attribute.

public void
setAtMost(String
the version to set
atMost
)

Set the atmost attribute.

public void
setExactly(String
the version to check against.
exactly
)

Set the exactly attribute.

private void
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

atLeastback to summary
private String atLeast
atMostback to summary
private String atMost
exactlyback to summary
private String exactly

Constructor Detail

JavaVersionback to summary
public JavaVersion()

Method Detail

evalback to summary
public boolean eval() throws BuildException

Implements org.apache.tools.ant.taskdefs.condition.Condition.eval.

Evaluate the condition.

Returns:boolean

true if the condition is true.

Exceptions
BuildException:
if an error occurs.
getAtLeastback to summary
public String getAtLeast()

Get the atleast attribute.

Returns:String

the atleast attribute.

getAtMostback to summary
public String getAtMost()

Get the atmost attribute.

Returns:String

the atmost attribute.

Since
Ant 1.10.10
getExactlyback to summary
public String getExactly()

Get the exactly attribute.

Returns:String

the exactly attribute.

setAtLeastback to summary
public void setAtLeast(String atLeast)

Set the atleast attribute. This is of the form major.minor.point. For example 1.7.0.

Parameters
atLeast:String

the version to set

setAtMostback to summary
public void setAtMost(String atMost)

Set the atmost attribute. This is of the form major.minor.point. For example 11.0.2

Parameters
atMost:String

the version to set

Since
Ant 1.10.10
setExactlyback to summary
public void setExactly(String exactly)

Set the exactly attribute. This is of the form major.minor.point. For example 1.7.0.

Parameters
exactly:String

the version to check against.

validateback to summary
private void validate() throws BuildException