Methods Summary |
---|
public java.lang.String | getName()Get the name of the definition.
return name;
|
public java.lang.String | getValue(org.apache.tools.ant.Task owner)This method gets the value of this definition. Will be null if a condition
was declared and not met
if (name == null) {
throw new BuildException("No name provided for the define element",
owner.getLocation());
}
if (!isSet(owner)) {
return null;
}
return name;
|
public boolean | isSet(org.apache.tools.ant.Task owner)logic taken from patternset
Project p = owner.getProject();
if (ifCond != null && p.getProperty(ifCond) == null) {
return false;
} else if (unlessCond != null && p.getProperty(unlessCond) != null) {
return false;
}
return true;
|
public void | setIf(java.lang.String condition)the name of a property which must be defined for
the definition to be set. Optional.
this.ifCond = condition;
|
public void | setName(java.lang.String name)the name of the definition. Required.
this.name = name;
|
public void | setUnless(java.lang.String condition)the name of a property which must be undefined for
the definition to be set. Optional.
this.unlessCond = condition;
|