How can a taskdef detect when one an attribute has been set? Given that a taskdef has the following set method:
how can one determine in the execute method if myCond was set other than comparing the value against the default value set in the implicit constructor? In other words is there a facility in the subclasses to see if a given attribute was set in the build.xml file or do I have to keep around another boolean, haveMyCond, that I set in the setMycond method and test against in the execute method?public class myTask extends Task { private boolean myCond = false;//.. public void setMycond(boolean myCond) this.myCond = myCond; } //.. public void execute() throws BuildException { // was myCond set? if (myCond == true) { // yes, do some operation } else { // maybe yes, maybe no.. } } }
Thanks,
Michael
