1 19 20 21 package org.apache.cayenne.gen; 22 23 import java.io.File ; 24 25 import org.apache.tools.ant.Task; 26 27 33 public class AntClassGenerator extends DefaultClassGenerator { 34 35 protected Task parentTask; 36 37 protected File fileForSuperclass(String pkgName, String className) 38 throws Exception { 39 40 File outFile = super.fileForSuperclass(pkgName, className); 41 if (outFile != null) { 42 parentTask.log("Generating superclass file: " + outFile.getCanonicalPath()); 43 } 44 45 return outFile; 46 } 47 48 protected File fileForClass(String pkgName, String className) 49 throws Exception { 50 51 File outFile = super.fileForClass(pkgName, className); 52 if (outFile != null) { 53 parentTask.log("Generating class file: " 54 + outFile.getCanonicalPath()); 55 } 56 return outFile; 57 } 58 59 public Task getParentTask() { 60 return parentTask; 61 } 62 63 68 public void setParentTask(Task parentTask) { 69 this.parentTask = parentTask; 70 } 71 } 72 | Popular Tags |