1 16 17 package org.apache.jk.ant; 18 19 import org.apache.tools.ant.Project; 20 21 29 public class Def { 30 String name; 31 String info; 32 String value; 33 String ifCond; 34 String unlessCond; 35 Project project; 36 37 public Def() { 38 } 39 40 public void setProject( Project p ) { 41 project=p; 42 } 43 44 public void setName(String n) { 45 name=n; 46 } 47 48 public void setValue( String v ) { 49 value=v; 50 } 51 52 public void setIf( String ifCond ) { 53 this.ifCond=ifCond; 54 } 55 56 public void setUnless( String unlessCond ) { 57 this.unlessCond=unlessCond; 58 } 59 60 62 public void setInfo(String n ) { 63 info=n; 64 } 65 66 68 71 public String getName() { 72 if( ifCond!=null && project.getProperty(ifCond) == null ) 73 return null; 74 if (unlessCond != null && project.getProperty(unlessCond) != null) 75 return null; 76 return name; 77 } 78 79 public String getValue() { 80 return value; 81 } 82 } 83 | Popular Tags |