1 package xdoclet.sdk.ant;
2
3 import xdoclet.MetadataProvider;
4 import xdoclet.XDocletException;
5 import xdoclet.XDoclet;
6
7 import java.util.Collection;
8 import java.util.Collections;
9
10 /***
11 * MetadataProvider that can be used to generate simple build.xml files
12 * from a given configuration of XDoclet.
13 *
14 * @bean.class name="ant"
15 * displayName="Ant"
16 * shortDescription="Generates build.xml file"
17 *
18 * @bean.icon color16="ant.gif"
19
20 * @author <a href="mailto:aslak.hellesoy at bekk.no">Aslak Hellesøy</a>
21 * @version $Revision: 1.1 $
22 */
23 public final class BuildXmlMetadataProvider implements MetadataProvider {
24 private XDoclet _xdoclet;
25
26 public void setXDoclet( XDoclet xdoclet ) {
27 _xdoclet = xdoclet;
28 }
29
30 // MetadataProvider methods
31 public Collection createMetadataCollection() throws XDocletException {
32 return Collections.singleton( _xdoclet );
33 }
34
35 public String getFilenameSubstitutionValue( Object o ) {
36 // Should never be called since we'll be used to generate
37 // one file only (an ant script).
38 throw new UnsupportedOperationException();
39 }
40
41 public String getPackageName( Object o ) {
42 // Should never be called since we'll be used to generate
43 // one file only (an ant script).
44 throw new UnsupportedOperationException();
45 }
46
47 public void cleanup() {
48 }
49
50 public void setClasspath( String classpath ) throws XDocletException {
51 }
52 }
This page was automatically generated by Maven