Class ScriptCondition

  extended by
      extended by
          extended by
All Implemented Interfaces:
java.lang.Cloneable, Condition

public class ScriptCondition
extends AbstractScriptComponent
implements 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
Fields inherited from class
description, location, project
Constructor Summary
Method Summary
 boolean eval()
          Is this condition true?
 boolean getValue()
          get the current value of the condition
 void setValue(boolean value)
          set the value of the condition.
Methods inherited from class
addText, createClasspath, executeScript, getRunner, initScriptRunner, setClasspath, setClasspathRef, setLanguage, setManager, setProject, setSetBeans, setSrc
Methods inherited from class
clone, getDescription, getLocation, getProject, log, log, setDescription, setLocation
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail


public ScriptCondition()
Method Detail


public boolean eval()
             throws BuildException
Is this condition true?

Specified by:
eval in interface Condition
true if the condition is true
BuildException - if an error occurs


public boolean getValue()
get the current value of the condition

true if the condition


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

value - the value to set the condition to