FileDocCategorySizeDatePackage
IsSet.javaAPI DocApache Ant 1.701723Wed Dec 13 06:16:20 GMT 2006org.apache.tools.ant.taskdefs.condition

IsSet

public class IsSet extends org.apache.tools.ant.ProjectComponent implements Condition
Condition that tests whether a given property has been set.
since
Ant 1.5

Fields Summary
private String
property
Constructors Summary
Methods Summary
public booleaneval()

return
true if the property exists
exception
BuildException if the property attribute is not set

        if (property == null) {
            throw new BuildException("No property specified for isset "
                                     + "condition");
        }

        return getProject().getProperty(property) != null;
    
public voidsetProperty(java.lang.String p)
Set the property attribute

param
p the property name

        property = p;