1 package csdl.jblanket.ant; 2 3 import java.util.Properties ; 4 5 import org.apache.tools.ant.Project; 6 import org.apache.tools.ant.Task; 7 import org.apache.tools.ant.types.Environment; 8 9 15 public abstract class JBlanketTask extends Task { 16 17 18 protected boolean enable; 19 20 protected boolean verbose; 21 22 23 protected boolean excludeOneLineMethods; 24 25 protected boolean excludeConstructors; 26 27 protected boolean excludeIndividualMethods; 28 29 30 protected String totalFile; 31 32 protected String oneLineFile; 33 34 protected String constructorFile; 35 36 protected String excludedIndividualFile; 37 38 41 public JBlanketTask() { 42 super(); 43 44 this.enable = true; 45 this.verbose = false; 46 47 this.excludeOneLineMethods = false; 48 this.excludeConstructors = false; 49 this.excludeIndividualMethods = false; 50 51 this.totalFile = null; 52 this.oneLineFile = null; 53 this.constructorFile = null; 54 this.excludedIndividualFile = null; 55 } 56 57 63 public void addConfiguredSysproperty(Environment.Variable systemProperty) { 64 65 Properties properties = new Properties (System.getProperties()); 66 properties.setProperty(systemProperty.getKey(), systemProperty.getValue()); 67 System.setProperties(properties); 68 } 69 70 78 public void setEnable(String enable) { 79 this.enable = Project.toBoolean(enable); 80 } 81 82 90 public void setVerbose(String value) { 91 this.verbose = Project.toBoolean(value); 92 } 93 94 103 public void setExcludeonelinemethods(String excludeOneLineMethods) { 104 this.excludeOneLineMethods = Project.toBoolean(excludeOneLineMethods); 105 } 106 107 115 public void setExcludeconstructors(String excludeConstructors) { 116 this.excludeConstructors = Project.toBoolean(excludeConstructors); 117 } 118 119 128 public void setExcludeindividualmethods(String excludeIndividualMethods) { 129 this.excludeIndividualMethods = Project.toBoolean(excludeIndividualMethods); 130 } 131 132 137 public void setTotalfile(String totalFile) { 138 this.totalFile = totalFile; 139 } 140 141 146 public void setOnelinefile(String oneLineFile) { 147 this.oneLineFile = oneLineFile; 148 } 149 150 155 public void setConstructorfile(String constructorFile) { 156 this.constructorFile = constructorFile; 157 } 158 159 164 public void setExcludedindividualfile(String excludedIndividualFile) { 165 this.excludedIndividualFile = excludedIndividualFile; 166 } 167 168 177 public void setPrintsummary(String value) { } 178 179 190 public void setFork(String value) { } 191 } | Popular Tags |