1 18 19 package org.apache.tools.ant.taskdefs.condition; 20 21 import org.apache.tools.ant.BuildException; 22 import org.apache.tools.ant.ProjectComponent; 23 24 29 public class IsSet extends ProjectComponent implements Condition { 30 private String property; 31 32 37 public void setProperty(String p) { 38 property = p; 39 } 40 41 45 public boolean eval() throws BuildException { 46 if (property == null) { 47 throw new BuildException("No property specified for isset " 48 + "condition"); 49 } 50 51 return getProject().getProperty(property) != null; 52 } 53 54 } 55 | Popular Tags |