KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > apache > ws > jaxme > js > pattern > Ant


1 /*
2  * Copyright 2003, 2004 The Apache Software Foundation
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15
16  */

17 package org.apache.ws.jaxme.js.pattern;
18
19 import java.io.File JavaDoc;
20 import java.io.IOException JavaDoc;
21 import java.sql.Connection JavaDoc;
22 import java.sql.DriverManager JavaDoc;
23 import java.sql.SQLException JavaDoc;
24 import java.util.ArrayList JavaDoc;
25 import java.util.Iterator JavaDoc;
26 import java.util.List JavaDoc;
27 import java.util.StringTokenizer JavaDoc;
28
29 import org.apache.ws.jaxme.js.DirectAccessible;
30 import org.apache.ws.jaxme.js.JavaMethod;
31 import org.apache.ws.jaxme.js.JavaQName;
32 import org.apache.ws.jaxme.js.JavaQNameImpl;
33 import org.apache.ws.jaxme.js.JavaSource;
34 import org.apache.ws.jaxme.js.JavaSourceFactory;
35 import org.apache.ws.jaxme.js.apps.XmlRpcClientGenerator;
36 import org.apache.ws.jaxme.js.pattern.VersionGenerator.TableInfo;
37 import org.apache.ws.jaxme.logging.AntProjectLoggerFactory;
38 import org.apache.ws.jaxme.logging.LoggerAccess;
39 import org.apache.ws.jaxme.logging.LoggerFactory;
40 import org.apache.ws.jaxme.sqls.Column;
41 import org.apache.ws.jaxme.sqls.Index;
42 import org.apache.ws.jaxme.sqls.SQLFactory;
43 import org.apache.ws.jaxme.sqls.Schema;
44 import org.apache.ws.jaxme.sqls.Table;
45 import org.apache.ws.jaxme.sqls.impl.ColumnImpl;
46 import org.apache.ws.jaxme.sqls.impl.SQLFactoryImpl;
47
48 import org.apache.tools.ant.AntClassLoader;
49 import org.apache.tools.ant.BuildException;
50 import org.apache.tools.ant.DirectoryScanner;
51 import org.apache.tools.ant.Project;
52 import org.apache.tools.ant.Task;
53 import org.apache.tools.ant.types.FileSet;
54 import org.apache.tools.ant.types.Path;
55
56
57 /** <p>A set of Ant tasks for running the generators in the
58  * pattern package.</p>
59  *
60  * @author <a HREF="mailto:joe@ispsoft.de">Jochen Wiedmann</a>
61  * @version $Id: Ant.java,v 1.10 2005/05/18 22:09:09 jochen Exp $
62  */

63 public class Ant {
64   protected abstract static class ReallyBasicAntTask extends Task {
65     private File JavaDoc destDir;
66     private boolean settingLoggerFactory = true;
67     private String JavaDoc classpathRef;
68     private Path classpath;
69     /** Sets, whether the Ant task initializes its own logger factory.
70      * Defaults to true.
71      */

72     public void setSettingLoggerFactory(boolean pSettingLoggerFactory) {
73       settingLoggerFactory = pSettingLoggerFactory;
74     }
75     /** Returns, whether the Ant task initializes its own logger factory.
76      * Defaults to true.
77      */

78     public boolean isSettingLoggerFactory() {
79       return settingLoggerFactory;
80     }
81     /** Sets, the destination directory, where sources are being generated to.
82      * Defaults to the current directory.
83      */

84     public void setDestDir(File JavaDoc pDir) {
85       destDir = pDir;
86     }
87     /** Sets, the destination directory, where sources are being generated to.
88      * Defaults to the current directory.
89      */

90     public File JavaDoc getDestDir() {
91        return destDir;
92     }
93     /** Sets a classpath reference, being used to load compiled classes
94      * or ressources.
95      */

96     public void setClasspathRef(String JavaDoc pRef) {
97         if(classpath != null) {
98             throw new BuildException("The 'classpathRef' attribute and the nested 'classpath' element are mutually exclusive.",
99                                      getLocation());
100         }
101         classpathRef = pRef;
102     }
103     /** Returns a classpath reference, being used to load compiled classes
104      * or ressources.
105      */

106     public String JavaDoc getClasspathRef() {
107         return classpathRef;
108     }
109     /** Sets a classpath, being used to load compiled classes
110      * or ressources.
111      */

112     public void addClasspath(Path pClasspath) {
113         if (classpath != null) {
114             throw new BuildException("Multiple nested 'classpath' elements are forbidden.", getLocation());
115         }
116         if (classpathRef != null) {
117             throw new BuildException("The 'classpathRef' attribute and the nested 'classpath' element are mutually exclusive.",
118                     getLocation());
119         }
120         classpath = pClasspath;
121     }
122     /** Returns a classpath, being used to load compiled classes
123      * or ressources.
124      */

125     public Path getClasspath() {
126         return classpath;
127     }
128     /** <p>Performs validation of the attributes and nested elements.</p>
129      */

130     public void finish() {
131     }
132     /** Abstract method, which is invoked to do the real work.
133      * @throws Exception
134      */

135     public abstract void doExecute() throws Exception JavaDoc;
136
137     public void execute() {
138       if (isSettingLoggerFactory()) {
139         LoggerFactory loggerFactory = LoggerAccess.getLoggerFactory();
140         if (!(loggerFactory instanceof AntProjectLoggerFactory)) {
141           LoggerAccess.setLoggerFactory(new AntProjectLoggerFactory(this));
142         }
143       }
144       Path classPath = getClasspath();
145       if (classPath == null) {
146         String JavaDoc cRef = getClasspathRef();
147         if (cRef != null) {
148             classPath = (Path) getProject().getReference(cRef);
149             if (classPath == null) {
150                 throw new BuildException("The reference " + cRef + " is not set.", getLocation());
151             }
152         }
153       }
154       AntClassLoader acl;
155       if (classPath == null) {
156         acl = null;
157       } else {
158         ClassLoader JavaDoc cl = Thread.currentThread().getContextClassLoader();
159         if (cl == null) {
160             cl = getClass().getClassLoader();
161             if (cl == null) {
162                 cl = ClassLoader.getSystemClassLoader();
163             }
164         }
165         acl = new AntClassLoader(cl, getProject(), classPath, true);
166         acl.setThreadContextLoader();
167       }
168       try {
169           finish();
170           doExecute();
171       } catch (BuildException e) {
172           throw e;
173       } catch (Exception JavaDoc e) {
174           throw new BuildException(e, getLocation());
175       } finally {
176           if (acl != null) {
177               acl.resetThreadContextLoader();
178           }
179       }
180     }
181   }
182
183   protected abstract static class BasicAntTask extends ReallyBasicAntTask {
184     private JavaQName targetClass;
185     /** Sets the name of the class being generated.
186      */

187     public void setTargetClass(String JavaDoc pTargetClass) {
188        targetClass = getJavaQName(pTargetClass);
189     }
190     public void finish() {
191           if (targetClass == null) {
192             throw new BuildException("The attribute 'targetClass' must be set.");
193           }
194       }
195       /** Abstract method, which is invoked to generate the target class.
196        */

197       public abstract void generate(JavaSourceFactory pFactory, JavaQName pTargetClass)
198           throws Exception JavaDoc;
199       public void doExecute() {
200           finish();
201           try {
202               JavaSourceFactory factory = new JavaSourceFactory();
203               generate(factory, targetClass);
204               factory.write(getDestDir());
205           } catch (Exception JavaDoc e) {
206               throw new BuildException(e, getLocation());
207           }
208       }
209   }
210
211   protected static JavaQName getJavaQName(String JavaDoc pName) {
212       return JavaQNameImpl.getInstance(pName, true);
213   }
214
215   /** The <code>AntProxyGenerator</code> is an Ant task
216    * providing access to the {@link ProxyGenerator}.
217    */

218   public static class AntProxyGenerator extends BasicAntTask {
219     private JavaQName extendedClass;
220     private List JavaDoc implementedInterfaces = new ArrayList JavaDoc();
221
222     /** Sets the class being extended, if any.
223      */

224     public void setExtendedClass(String JavaDoc pTargetClass) {
225       extendedClass = getJavaQName(pTargetClass);
226     }
227     /** Adds a new interface being implemented.
228      */

229     public InterfaceDescription createImplementedInterface() {
230       InterfaceDescription result = new InterfaceDescription();
231       implementedInterfaces.add(result);
232       return result;
233     }
234     public void finish() {
235         super.finish();
236       if (implementedInterfaces.size() == 0) {
237         throw new BuildException("You must specify at least one interface being implemented (child element 'implementedInterface')");
238       }
239     }
240     public void generate(JavaSourceFactory pFactory, JavaQName pTargetClass)
241         throws BuildException {
242         ProxyGenerator proxyGenerator = new ProxyGenerator();
243         if (extendedClass != null) {
244           proxyGenerator.setExtendedClass(extendedClass);
245         }
246         try {
247             proxyGenerator.generate(pFactory, pTargetClass,
248                                     (InterfaceDescription[])
249                                       implementedInterfaces.toArray(new InterfaceDescription[implementedInterfaces.size()]));
250         } catch (Exception JavaDoc e) {
251             throw new BuildException(e, getLocation());
252         }
253     }
254   }
255
256   /** Ant task for generating typesafe enumerations.
257    */

258   public static class AntTypesafeEnumerationGenerator extends BasicAntTask {
259       private List JavaDoc items = new ArrayList JavaDoc();
260       private boolean isAddingEquals = true;
261
262       /** Sets whether the equals and hashCode methods are being
263        * generated. Defaults to true.
264        */

265       public void setAddingEquals(boolean pAddingEquals) {
266           isAddingEquals = pAddingEquals;
267       }
268
269       /** Creates a new, nested item.
270        */

271       public TypesafeEnumerationGenerator.Item createItem() {
272           TypesafeEnumerationGenerator.Item item = new TypesafeEnumerationGenerator.Item();
273           items.add(item);
274           return item;
275       }
276
277     public void finish() {
278           super.finish();
279           if (items.size() == 0) {
280               throw new BuildException("The generated enumeration must have at least a single item.");
281           }
282       }
283
284     public void generate(JavaSourceFactory pFactory, JavaQName pTargetClass)
285         throws Exception JavaDoc {
286         TypesafeEnumerationGenerator generator = new TypesafeEnumerationGenerator();
287         generator.setAddingEquals(isAddingEquals);
288           TypesafeEnumerationGenerator.Item[] myItems = (TypesafeEnumerationGenerator.Item[])
289           this.items.toArray(new TypesafeEnumerationGenerator.Item[this.items.size()]);
290           generator.generate(pFactory, pTargetClass, myItems);
291     }
292   }
293
294   /** Ant task for the {@link org.apache.ws.jaxme.js.pattern.ChainGenerator}.
295    */

296   public static class AntChainGenerator extends ReallyBasicAntTask {
297      private List JavaDoc chains = new ArrayList JavaDoc();
298      /** Creates a new, nested element with another chain being
299       * generated.
300       */

301      public ChainGenerator createChain() {
302         ChainGenerator chain = new ChainGenerator();
303         chains.add(chain);
304         return chain;
305      }
306      public void finish() {
307         if (chains.size() == 0) {
308            throw new BuildException("At least one nested 'chain' element must be given.",
309                                      getLocation());
310         }
311      }
312      public void doExecute() {
313         JavaSourceFactory pFactory = new JavaSourceFactory();
314         for (Iterator JavaDoc iter = chains.iterator(); iter.hasNext(); ) {
315            ChainGenerator chain = (ChainGenerator) iter.next();
316            try {
317               chain.generate(pFactory);
318            } catch (Exception JavaDoc e) {
319               throw new BuildException(e, getLocation());
320            }
321         }
322         try {
323            pFactory.write(getDestDir());
324         } catch (IOException JavaDoc e) {
325            throw new BuildException(e, getLocation());
326         }
327      }
328   }
329
330   /** Ant task for the {@link org.apache.ws.jaxme.js.pattern.VersionGenerator}
331    */

332   public static class AntVersionGenerator extends BasicAntTask {
333     private String JavaDoc driver, url, user, password, schema, verColumn;
334     private List JavaDoc tables;
335     private boolean isGeneratingLogging;
336
337     /** Returns the JDBC driver.
338      */

339     public String JavaDoc getDriver() { return driver; }
340     /** Sets the JDBC driver.
341      */

342     public void setDriver(String JavaDoc pDriver) { driver = pDriver; }
343     /** Returns the JDBC password.
344      */

345     public String JavaDoc getPassword() { return password; }
346     /** Sets the JDBC password.
347      */

348     public void setPassword(String JavaDoc pPassword) { password = pPassword; }
349     /** Returns the JDBC URL.
350      */

351     public String JavaDoc getUrl() { return url; }
352     /** Sets the JDBC URL.
353      */

354     public void setUrl(String JavaDoc pUrl) { url = pUrl; }
355     /** Returns the JDBC user.
356      */

357     public String JavaDoc getUser() { return user; }
358     /** Sets the JDBC user.
359      */

360     public void setUser(String JavaDoc pUser) { user = pUser; }
361     /** Returns the database schema name.
362      */

363     public String JavaDoc getSchema() { return schema; }
364     /** Sets the database schema name.
365      */

366     public void setSchema(String JavaDoc pSchema) { schema = pSchema; }
367     /** Sets the table list; the table names are separated with white space.
368      */

369     public void setTables(String JavaDoc pTables) {
370       tables = new ArrayList JavaDoc();
371       for (StringTokenizer JavaDoc st = new StringTokenizer JavaDoc(pTables); st.hasMoreTokens(); ) {
372         String JavaDoc tableName = st.nextToken();
373         tables.add(tableName);
374       }
375     }
376     /** Returns the table list.
377      */

378     public List JavaDoc getTables() {
379       return tables;
380     }
381     /** Sets the column with the version number.
382      */

383     public void setVerColumn(String JavaDoc pColumn) {
384       verColumn = pColumn;
385     }
386     /** Returns the column with the version number.
387      */

388     public String JavaDoc getVerColumn() {
389       return verColumn;
390     }
391     /** Sets whether logging statements are being generated.
392      */

393     public void setGeneratingLogging(boolean pGeneratingLogging) {
394       isGeneratingLogging = pGeneratingLogging;
395     }
396     /** Returns whether logging statements are being generated.
397      */

398     public boolean isGeneratingLogging() {
399       return isGeneratingLogging;
400     }
401
402     protected Connection JavaDoc getConnection() throws ClassNotFoundException JavaDoc, SQLException JavaDoc {
403        String JavaDoc myUrl = getUrl();
404        if (myUrl == null) {
405          throw new NullPointerException JavaDoc("Missing 'url' attribute");
406        }
407
408        String JavaDoc myDriver = getDriver();
409        if (myDriver != null) {
410          try {
411            Class.forName(myDriver);
412          } catch (ClassNotFoundException JavaDoc ex) {
413            try {
414              ClassLoader JavaDoc cl = Thread.currentThread().getContextClassLoader();
415              if (cl == null) {
416                throw new ClassNotFoundException JavaDoc(myDriver);
417              }
418              cl.loadClass(myDriver);
419            } catch (ClassNotFoundException JavaDoc ex2) {
420              throw ex;
421            }
422          }
423        }
424
425        return DriverManager.getConnection(myUrl, getUser(), getPassword());
426     }
427
428     private class IdIncrementer implements VersionGenerator.ColumnUpdater {
429       private final List JavaDoc columns;
430       IdIncrementer(List JavaDoc pColumns) {
431         columns = pColumns;
432       }
433       public void update(JavaMethod pMethod, TableInfo pTableInfo, DirectAccessible pConnection, DirectAccessible pMap, DirectAccessible pRow) {
434         for (Iterator JavaDoc iter = columns.iterator(); iter.hasNext(); ) {
435           Integer JavaDoc columnNum = (Integer JavaDoc) iter.next();
436           pMethod.addLine(pRow, "[", columnNum, "] = Long.toString(Long.parseLong((String) ",
437                           pRow, "[", columnNum, "])+1);");
438         }
439       }
440     }
441
442     private class VerNumIncrementer implements VersionGenerator.ColumnUpdater {
443       private final int columnNumber;
444       VerNumIncrementer(int pColumnNumber) {
445         columnNumber = pColumnNumber;
446       }
447       public void update(JavaMethod pMethod, TableInfo pTableInfo, DirectAccessible pConnection, DirectAccessible pMap, DirectAccessible pRow) {
448         pMethod.addLine(pRow, "[" + columnNumber + "] = new Integer(((Integer) ",
449                         pRow, "[" + columnNumber + "]).intValue()+1);");
450       }
451     }
452
453     public void generate(JavaSourceFactory pFactory, JavaQName pTargetClass) throws Exception JavaDoc {
454       List JavaDoc myTables = getTables();
455       if (myTables == null) {
456         throw new NullPointerException JavaDoc("Missing 'tables' attribute");
457       }
458       if (getVerColumn() == null) {
459         throw new NullPointerException JavaDoc("Missing 'verColumn' attribute");
460       }
461       Column.Name columnName = new ColumnImpl.NameImpl(getVerColumn());
462
463       SQLFactory factory = new SQLFactoryImpl();
464       Schema sch = factory.getSchema(getConnection(), getSchema());
465
466       VersionGenerator versionGenerator = new VersionGenerator();
467       versionGenerator.setGeneratingLogging(isGeneratingLogging());
468       boolean isFirstTable = true;
469
470       for (Iterator JavaDoc iter = myTables.iterator(); iter.hasNext(); ) {
471         String JavaDoc tableName = (String JavaDoc) iter.next();
472         Table table = sch.getTable(tableName);
473         if (table == null) {
474           throw new IllegalArgumentException JavaDoc("Invalid table name: " + tableName);
475         }
476
477         VersionGenerator.ColumnUpdater columnUpdater;
478         if (isFirstTable) {
479           Column column = null;
480           int columnNum = -1;
481           int i = 0;
482           for (Iterator JavaDoc colIter = table.getColumns(); colIter.hasNext(); i++) {
483             Column colIterColumn = (Column) colIter.next();
484             if (colIterColumn.getName().equals(columnName)) {
485               column = colIterColumn;
486               columnNum = i;
487               break;
488             }
489           }
490           if (column == null) {
491             throw new IllegalArgumentException JavaDoc("No column " + columnName +
492                                                " found in table " + table.getQName());
493           }
494           isFirstTable = false;
495           columnUpdater = new VerNumIncrementer(columnNum);
496         } else {
497           List JavaDoc pkColumns = new ArrayList JavaDoc();
498           Index primaryKey = table.getPrimaryKey();
499           if (primaryKey != null) {
500             for (Iterator JavaDoc pkIter = primaryKey.getColumns(); pkIter.hasNext(); ) {
501               Column pkColumn = (Column) pkIter.next();
502               int columnNum = -1;
503               int i = 0;
504               for (Iterator JavaDoc colIter = table.getColumns(); colIter.hasNext(); i++) {
505                 Column colIterColumn = (Column) colIter.next();
506                 if (colIterColumn.getName().equals(pkColumn.getName())) {
507                   columnNum = i;
508                   break;
509                 }
510               }
511               if (columnNum == -1) {
512                 throw new IllegalStateException JavaDoc("Primary key column " + pkColumn.getQName() +
513                                                 " not found in table " + table.getQName());
514               }
515               pkColumns.add(new Integer JavaDoc(columnNum));
516             }
517           }
518           if (pkColumns.size() == 0) {
519             throw new IllegalArgumentException JavaDoc("The table " + table.getQName() +
520                                                " doesn't have a primary key.");
521           }
522           columnUpdater = new IdIncrementer(pkColumns);
523         }
524         versionGenerator.addTable(table, columnUpdater);
525       }
526
527       JavaSource js = pFactory.newJavaSource(pTargetClass);
528       versionGenerator.getCloneMethod(js);
529     }
530   }
531
532     /** An ant task for the {@link org.apache.ws.jaxme.js.apps.XmlRpcClientGenerator}.
533      */

534     public static class XmlRpcGenerator extends ReallyBasicAntTask {
535         /** The nested child element "dispatcher".
536          */

537         public static class Dispatcher {
538             private String JavaDoc name;
539             private boolean implementingXmlRpcHandler = true;
540
541             /** Sets the fully qualified name of the dispatcher class.
542              */

543             public void setName(String JavaDoc pName) {
544                 name = pName;
545             }
546
547             /** Returns the fully qualified name of the dispatcher class.
548              */

549             public String JavaDoc getName() {
550                 return name;
551             }
552
553             /** Returns whether the dispatcher will implement
554              * XmlRpcHandler. Defaults to true.
555              */

556             public boolean isImplementingXmlRpcHandler() {
557                 return implementingXmlRpcHandler;
558             }
559
560             /** Sets whether the dispatcher will implement
561              * XmlRpcHandler. Defaults to true.
562              */

563             public void setImplementingXmlRpcHandler(boolean pImplementingXmlRpcHandler) {
564                 implementingXmlRpcHandler = pImplementingXmlRpcHandler;
565             }
566         }
567
568         private final List JavaDoc serverClasses = new ArrayList JavaDoc();
569         private final JavaSourceFactory jsf = new JavaSourceFactory();
570         private String JavaDoc targetPackage;
571         private Dispatcher dispatcher;
572
573         /** Creates the dispatcher.
574          */

575         public Dispatcher createDispatcher() {
576             if (dispatcher != null) {
577                 throw new BuildException("The nested 'dispatcher' element must not be used more than once.");
578             }
579             dispatcher = new Dispatcher();
580             return dispatcher;
581         }
582
583         /** Returns the dispatcher.
584          */

585         public Dispatcher getDispatcher() {
586             return dispatcher;
587         }
588
589         /** Sets the target package.
590          */

591         public void setTargetPackage(String JavaDoc pPackage) {
592             targetPackage = pPackage;
593         }
594
595         /** Returns the target package.
596          */

597         public String JavaDoc getTargetPackage() {
598             return targetPackage;
599         }
600
601         /** Creates a new, nested element with a {@link FileSet} of
602          * server side classes, for which client stubs are being
603          * generated.
604          */

605         public FileSet createServerClasses() {
606             FileSet fs = (FileSet) getProject().createDataType("fileset");
607             serverClasses.add(fs);
608             return fs;
609         }
610
611         public void finish() {
612             super.finish();
613             if (targetPackage == null) {
614                 throw new BuildException("Missing 'targetPackage' attribute",
615                                          getLocation());
616             }
617             if (serverClasses.size() == 0) {
618                 throw new BuildException("Missing nested element 'serverClasses'",
619                                          getLocation());
620             }
621         }
622
623         public void doExecute() throws Exception JavaDoc {
624             JavaSourceFactory jsf = new JavaSourceFactory();
625             JavaSourceFactory inputs = new JavaSourceFactory();
626             XmlRpcClientGenerator gen = new XmlRpcClientGenerator(jsf, getTargetPackage());
627             List JavaDoc sources = new ArrayList JavaDoc();
628             for (int i = 0; i < serverClasses.size(); i++) {
629                 FileSet fs = (FileSet) serverClasses.get(i);
630                 DirectoryScanner ds = fs.getDirectoryScanner(getProject());
631                 String JavaDoc[] files = ds.getIncludedFiles();
632                 for (int j = 0; j < files.length; j++) {
633                     String JavaDoc s = files[j];
634                     Reflector r;
635                     if (s.endsWith(".class")) {
636                         s = s.substring(0, s.length() - ".class".length());
637                         r = new CompiledClassReflector(s.replace('/', '.'), Thread.currentThread().getContextClassLoader());
638                     } else if (s.endsWith(".java")) {
639                         r = new SourceReflector(new File JavaDoc(ds.getBasedir(), s));
640                     } else {
641                         throw new BuildException("Unknown extension in file name: " + s
642                                                  + ", expected .class or .java",
643                                                  getLocation());
644                     }
645                     JavaSource js = r.getJavaSource(inputs);
646                     sources.add(js);
647                 }
648             }
649             for (int i = 0; i < sources.size(); i++) {
650                 JavaSource js = (JavaSource) sources.get(i);
651                 if (js.isAbstract()) {
652                     getProject().log("Ignoring abstract class " + js.getQName(), Project.MSG_VERBOSE);
653                 } else {
654                     getProject().log("Generating XML-RPC client for " + js.getQName(), Project.MSG_DEBUG);
655                     gen.addClass(js, inputs);
656                 }
657             }
658
659             Dispatcher disp = getDispatcher();
660             if (disp != null) {
661                 gen.setDispatcherImplementsXmlRpcHandler(disp.isImplementingXmlRpcHandler());
662                 gen.getDispatcher(JavaQNameImpl.getInstance(disp.getName(), true));
663             }
664             jsf.write(getDestDir());
665         }
666     }
667 }
668
Popular Tags