1 18 package org.apache.beehive.netui.compiler.xdoclet.tools; 19 20 import org.apache.tools.ant.taskdefs.Copy; 21 import org.apache.tools.ant.BuildException; 22 23 import java.util.Iterator ; 24 import java.util.Map ; 25 import java.io.File ; 26 import java.io.IOException ; 27 28 public class AnnotationsToXDocletTask 29 extends Copy 30 { 31 protected void doFileOperations() 32 { 33 try 34 { 35 AnnotationsToXDoclet atx = new AnnotationsToXDoclet(); 36 37 for ( Iterator i = fileCopyMap.entrySet().iterator(); i.hasNext(); ) 38 { 39 Map.Entry entry = ( Map.Entry ) i.next(); 40 String [] values = ( String [] ) entry.getValue(); 41 assert values.length == 1 : values.length; 42 atx.translate( new File ( ( String ) entry.getKey() ), new File ( values[0] ) ); 43 } 44 } 45 catch ( IOException e ) 46 { 47 throw new BuildException( e ); 48 } 49 } 50 } 51 | Popular Tags |