1 5 package xdoclet; 6 7 import java.io.File ; 8 9 import org.apache.tools.ant.Project; 10 11 16 19 public class XDocletFacade 20 { 21 private Project dummyProject; 22 23 public XDocletFacade() 24 { 25 dummyProject = new Project(); 26 27 dummyProject.setName("DummyProject"); 28 } 29 30 public File getBaseDir() 31 { 32 return dummyProject.getBaseDir(); 33 } 34 35 public void setBaseDir(File base_dir) 36 { 37 dummyProject.setBaseDir(base_dir); 38 } 39 40 public void process(DocletTask task, SubTask[] subtasks) 41 { 42 task.setProject(dummyProject); 43 task.setTaskName(task.getClass().getName()); 44 45 for (int i = 0; i < subtasks.length; i++) { 46 SubTask subtask = subtasks[i]; 47 48 task.addSubTask(subtask); 49 } 50 51 task.execute(); 52 } 53 } 54 | Popular Tags |