1 56 57 package org.objectstyle.cayenne.gen; 58 59 import java.io.File ; 60 61 import org.apache.tools.ant.Task; 62 63 69 public class AntClassGenerator extends DefaultClassGenerator { 70 71 protected Task parentTask; 72 73 protected File fileForSuperclass(String pkgName, String className) 74 throws Exception { 75 76 File outFile = super.fileForSuperclass(pkgName, className); 77 if (outFile != null) { 78 parentTask.log("Generating superclass file: " + outFile.getCanonicalPath()); 79 } 80 81 return outFile; 82 } 83 84 protected File fileForClass(String pkgName, String className) 85 throws Exception { 86 87 File outFile = super.fileForClass(pkgName, className); 88 if (outFile != null) { 89 parentTask.log("Generating class file: " 90 + outFile.getCanonicalPath()); 91 } 92 return outFile; 93 } 94 95 public Task getParentTask() { 96 return parentTask; 97 } 98 99 104 public void setParentTask(Task parentTask) { 105 this.parentTask = parentTask; 106 } 107 } | Popular Tags |