1 28 29 package com.idaremedia.antx.go; 30 31 import org.apache.tools.ant.Project; 32 33 import com.idaremedia.antx.helpers.Tk; 34 35 45 46 public final class Unless 47 { 48 56 public static final boolean allowed(String property, Project P) 57 { 58 return allowed(property, P, false); 59 } 60 61 62 63 75 public static final boolean allowed(String property, Project P, 76 boolean onlyUnlessTrue) 77 { 78 if (property==null || "".equals(property)) { 79 return true; 80 } 81 String test = Tk.resolveString(P,property); 82 if (onlyUnlessTrue) { 83 return !Tk.booleanFrom(P.getProperty(test)); } 85 return P.getProperty(test)==null; 86 } 87 88 89 90 private Unless() 91 { 92 } 93 } 94 95 96 | Popular Tags |