FileDocCategorySizeDatePackage
ScriptCondition.javaAPI DocApache Ant 1.702178Wed Dec 13 06:16:20 GMT 2006org.apache.tools.ant.types.optional

ScriptCondition

public class ScriptCondition extends AbstractScriptComponent implements 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'

Fields Summary
private boolean
value
result field
Constructors Summary
Methods Summary
public booleaneval()
Is this condition true?

return
true if the condition is true
throws
org.apache.tools.ant.BuildException if an error occurs



                                   
         
        initScriptRunner();
        executeScript("ant_condition");
        return getValue();
    
public booleangetValue()
get the current value of the conditon

return
true if the condition

        return value;
    
public voidsetValue(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

param
value the value to set the condition to

        this.value = value;