Top Description Fields Constructors Methods
org.apache.tools.ant.types.optional

public Class ScriptCondition

extends AbstractScriptComponent
implements Condition
Class Inheritance
All Implemented Interfaces
org.apache.tools.ant.taskdefs.condition.Condition
Imports
org.apache.tools.ant.BuildException, org.apache.tools.ant.taskdefs.condition.Condition

A condition that lets you include script. The condition component sets a bean "self", whose attribute "value" must be set to true for the condition to succeed, false to fail. The default is 'false'

Field Summary

Modifier and TypeField and Description
private boolean
value

result field

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.

Is this condition true?
public boolean

Returns:

true if the condition
getValue
()

get the current value of the condition

public void
setValue(boolean
the value to set the condition to
value
)

set the value of the condition.

Inherited from org.apache.tools.ant.types.optional.AbstractScriptComponent:
addTextcreateClasspathexecuteScriptgetRunnerinitScriptRunnersetClasspathsetClasspathRefsetEncodingsetLanguagesetManagersetManagersetProjectsetSetBeanssetSrc

Field Detail

valueback to summary
private boolean value

result field

Constructor Detail

ScriptConditionback to summary
public ScriptCondition()

Method Detail

evalback to summary
public boolean eval() throws BuildException

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

Is this condition true?

Returns:boolean

true if the condition is true

Annotations
@Override
Exceptions
BuildException:
if an error occurs
getValueback to summary
public boolean getValue()

get the current value of the condition

Returns:boolean

true if the condition

setValueback to summary
public void setValue(boolean value)

set the value of the condition. This is used by the script to pass the return value. It can be used by an attribute, in which case it sets the default value

Parameters
value:boolean

the value to set the condition to